diff --git a/README.md b/README.md index 4680b6a..fefa9dd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Pinterest's REST API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 5.14.0 -- Package version: 0.1.10 +- Package version: 0.1.11 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://developers.pinterest.com/](https://developers.pinterest.com/) diff --git a/docs/AdGroupIdFilter.md b/docs/AdGroupIdFilter.md new file mode 100644 index 0000000..16a79f8 --- /dev/null +++ b/docs/AdGroupIdFilter.md @@ -0,0 +1,12 @@ +# AdGroupIdFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ad_group_ids** | **[str]** | List of ad group ids | [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/AdPinAnalytics.md b/docs/AdPinAnalytics.md new file mode 100644 index 0000000..7d1b44f --- /dev/null +++ b/docs/AdPinAnalytics.md @@ -0,0 +1,13 @@ +# AdPinAnalytics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin_id** | **str** | The ID of the pin that the metric belongs to. | +**date** | **date** | Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`) | [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/AdPinsAnalyticsResponse.md b/docs/AdPinsAnalyticsResponse.md new file mode 100644 index 0000000..e2297c1 --- /dev/null +++ b/docs/AdPinsAnalyticsResponse.md @@ -0,0 +1,11 @@ +# AdPinsAnalyticsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[AdPinAnalytics]**](AdPinAnalytics.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/AdPreviewShopping.md b/docs/AdPreviewShopping.md new file mode 100644 index 0000000..b8d8be9 --- /dev/null +++ b/docs/AdPreviewShopping.md @@ -0,0 +1,21 @@ +# AdPreviewShopping + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_product_group_id** | **str** | Catalog Product Group Id. | +**creative_type** | **str** | Ad format of the shopping ad preview. | +**customizable_cta_type** | [**CustomizableCtaType**](CustomizableCtaType.md) | | [optional] +**image_tag** | **str** | Multi image template tag. | [optional] +**video_tag** | **str** | Multi video template tag, image_tag and video_tag are mutual exclusive. | [optional] +**preferred_media_type** | **str** | Preferred media type. | [optional] +**hero_pin_id** | **str** | Pin id for the hero image. When creative type is COLLECTION, either hero_pin_id or (hero_image_url, hero_image_title) is required. | [optional] +**hero_image_url** | **str** | Hero image URL. | [optional] +**hero_image_title** | **str** | Title displayed below ad. | [optional] +**item_id** | **str** | Item id for product to preview standard shopping ads, optional and only applicable when creative type is SHOPPING. | [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/AdsAnalyticsAdGroupTargetingType.md b/docs/AdsAnalyticsAdGroupTargetingType.md new file mode 100644 index 0000000..ab3d16a --- /dev/null +++ b/docs/AdsAnalyticsAdGroupTargetingType.md @@ -0,0 +1,12 @@ +# AdsAnalyticsAdGroupTargetingType + +Reporting targeting type for ad groups + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Reporting targeting type for ad groups | must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", "CREATIVE_ENHANCEMENTS", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AllOf.md b/docs/AllOf.md new file mode 100644 index 0000000..5e06163 --- /dev/null +++ b/docs/AllOf.md @@ -0,0 +1,12 @@ +# AllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all_of** | [**[CatalogsProductGroupFilterKeys]**](CatalogsProductGroupFilterKeys.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/AnyOf.md b/docs/AnyOf.md new file mode 100644 index 0000000..237bb1b --- /dev/null +++ b/docs/AnyOf.md @@ -0,0 +1,12 @@ +# AnyOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any_of** | [**[CatalogsProductGroupFilterKeys]**](CatalogsProductGroupFilterKeys.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/AudienceDefinitionScope.md b/docs/AudienceDefinitionScope.md new file mode 100644 index 0000000..401a3f1 --- /dev/null +++ b/docs/AudienceDefinitionScope.md @@ -0,0 +1,13 @@ +# AudienceDefinitionScope + +Generated audience scope to request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **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/AudienceDefinitionType.md b/docs/AudienceDefinitionType.md new file mode 100644 index 0000000..6a3442f --- /dev/null +++ b/docs/AudienceDefinitionType.md @@ -0,0 +1,13 @@ +# AudienceDefinitionType + +Generated audience type to request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **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/BillingInvoiceDownloadResponse.md b/docs/BillingInvoiceDownloadResponse.md new file mode 100644 index 0000000..6377290 --- /dev/null +++ b/docs/BillingInvoiceDownloadResponse.md @@ -0,0 +1,13 @@ +# BillingInvoiceDownloadResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The billing invoice id | [optional] +**download_url** | **str** | The download url for the billing invoice | [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/BillingInvoiceResponse.md b/docs/BillingInvoiceResponse.md new file mode 100644 index 0000000..c52dd71 --- /dev/null +++ b/docs/BillingInvoiceResponse.md @@ -0,0 +1,26 @@ +# BillingInvoiceResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for the billing invoice | [optional] +**ad_account_id** | **str** | The ID of the ad account this invoice belongs to | [optional] +**ad_account_name** | **str** | The name of the ad account this invoice belongs to | [optional] +**document_type** | **str** | The type of the document | [optional] +**amount_billed_micro_currency** | **int** | The amount billed in this invoice. Denoted in micro currency | [optional] +**amount_tax_micro_currency** | **int, none_type** | The tax in this invoice. Denoted in micro currency | [optional] +**amount_net_micro_currency** | **int, none_type** | The net amount in this invoice. Denoted in micro currency | [optional] +**amount_discount_micro_currency** | **int, none_type** | The discount in this invoice. Denoted in micro currency | [optional] +**currency** | [**Currency**](Currency.md) | | [optional] +**billing_period_start_date** | **date** | The start date of the billing period. Format: YYYY-MM-DD | [optional] +**billing_period_end_date** | **date** | The end date of the billing period. Format: YYYY-MM-DD | [optional] +**invoice_due_date** | **date** | The date the invoice is due. Format: YYYY-MM-DD | [optional] +**status** | **str** | The status of the invoice | [optional] +**payment_terms** | **str** | The payment terms of the invoice | [optional] +**bill_to_country** | **str** | The country of the bill to address | [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/CampaignAudienceMultipliers.md b/docs/CampaignAudienceMultipliers.md new file mode 100644 index 0000000..9a0c12e --- /dev/null +++ b/docs/CampaignAudienceMultipliers.md @@ -0,0 +1,13 @@ +# CampaignAudienceMultipliers + +This represents a mapping from Audience ID 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 audience in `MAX_BID` ad groups in `CATALOG_SALES` campaigns. All audience 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 +------------ | ------------- | ------------- | ------------- +**audience_id** | **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/CampaignBidOptions.md b/docs/CampaignBidOptions.md new file mode 100644 index 0000000..52e76d5 --- /dev/null +++ b/docs/CampaignBidOptions.md @@ -0,0 +1,15 @@ +# CampaignBidOptions + +Object describing the campaign level bid multipliers. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_multipliers** | [**CampaignAudienceMultipliers**](CampaignAudienceMultipliers.md) | | [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/CampaignBidOptionsCreate.md b/docs/CampaignBidOptionsCreate.md new file mode 100644 index 0000000..54c3375 --- /dev/null +++ b/docs/CampaignBidOptionsCreate.md @@ -0,0 +1,15 @@ +# CampaignBidOptionsCreate + +Object describing the campaign level bid multipliers. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audience_multipliers** | [**CampaignAudienceMultipliers**](CampaignAudienceMultipliers.md) | | [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/CampaignBidOptionsUpdate.md b/docs/CampaignBidOptionsUpdate.md new file mode 100644 index 0000000..ce9f4ed --- /dev/null +++ b/docs/CampaignBidOptionsUpdate.md @@ -0,0 +1,16 @@ +# CampaignBidOptionsUpdate + +Object describing an update to the campaign level bid multipliers. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**update_mask** | **[str]** | List of fields to update, only the fields in the list will be updated. | +**audience_multipliers** | [**CampaignAudienceMultipliers**](CampaignAudienceMultipliers.md) | | [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/CampaignBidOptionsUpdateAllOf.md b/docs/CampaignBidOptionsUpdateAllOf.md new file mode 100644 index 0000000..91e69fb --- /dev/null +++ b/docs/CampaignBidOptionsUpdateAllOf.md @@ -0,0 +1,12 @@ +# CampaignBidOptionsUpdateAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**update_mask** | **[str]** | List of fields to update, only the fields in the list will 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/CampaignIdFilter.md b/docs/CampaignIdFilter.md new file mode 100644 index 0000000..3e9a217 --- /dev/null +++ b/docs/CampaignIdFilter.md @@ -0,0 +1,12 @@ +# CampaignIdFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_ids** | **[str]** | List of campaign ids | [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/CampaignObjectivesFilter.md b/docs/CampaignObjectivesFilter.md new file mode 100644 index 0000000..c4d8679 --- /dev/null +++ b/docs/CampaignObjectivesFilter.md @@ -0,0 +1,12 @@ +# CampaignObjectivesFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_objective_types** | [**[ObjectiveType]**](ObjectiveType.md) | List of values for filtering. [\"WEB_SESSIONS\"] in BETA. | [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/CatalogsAvailableFilterValues.md b/docs/CatalogsAvailableFilterValues.md new file mode 100644 index 0000000..a2979d6 --- /dev/null +++ b/docs/CatalogsAvailableFilterValues.md @@ -0,0 +1,14 @@ +# CatalogsAvailableFilterValues + +Object holding available filter values for each filter key + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catalog_type** | **str** | | defaults to "CREATIVE_ASSETS" +**filter_values** | [**CatalogsCreativeAssetsFilterValuesMap**](CatalogsCreativeAssetsFilterValuesMap.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/CatalogsCreativeAssetsAvailableFilterValues.md b/docs/CatalogsCreativeAssetsAvailableFilterValues.md new file mode 100644 index 0000000..fd59549 --- /dev/null +++ b/docs/CatalogsCreativeAssetsAvailableFilterValues.md @@ -0,0 +1,13 @@ +# CatalogsCreativeAssetsAvailableFilterValues + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_values** | [**CatalogsCreativeAssetsFilterValuesMap**](CatalogsCreativeAssetsFilterValuesMap.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/CatalogsCreativeAssetsFilterValuesMap.md b/docs/CatalogsCreativeAssetsFilterValuesMap.md new file mode 100644 index 0000000..08ebc16 --- /dev/null +++ b/docs/CatalogsCreativeAssetsFilterValuesMap.md @@ -0,0 +1,25 @@ +# CatalogsCreativeAssetsFilterValuesMap + +A map of filter attributes to their available values. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_label_0** | **[str]** | | [optional] +**custom_label_1** | **[str]** | | [optional] +**custom_label_2** | **[str]** | | [optional] +**custom_label_3** | **[str]** | | [optional] +**custom_label_4** | **[str]** | | [optional] +**google_product_category_0** | **[str]** | | [optional] +**google_product_category_1** | **[str]** | | [optional] +**google_product_category_2** | **[str]** | | [optional] +**google_product_category_3** | **[str]** | | [optional] +**google_product_category_4** | **[str]** | | [optional] +**google_product_category_5** | **[str]** | | [optional] +**google_product_category_6** | **[str]** | | [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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelAvailableFilterValues.md b/docs/CatalogsHotelAvailableFilterValues.md new file mode 100644 index 0000000..73a868a --- /dev/null +++ b/docs/CatalogsHotelAvailableFilterValues.md @@ -0,0 +1,13 @@ +# CatalogsHotelAvailableFilterValues + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_values** | [**CatalogsHotelFilterValuesMap**](CatalogsHotelFilterValuesMap.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/CatalogsHotelFilterValuesMap.md b/docs/CatalogsHotelFilterValuesMap.md new file mode 100644 index 0000000..b7549ee --- /dev/null +++ b/docs/CatalogsHotelFilterValuesMap.md @@ -0,0 +1,18 @@ +# CatalogsHotelFilterValuesMap + +A map of filter attributes to their available values. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**brand** | **[str]** | | [optional] +**custom_label_0** | **[str]** | | [optional] +**custom_label_1** | **[str]** | | [optional] +**custom_label_2** | **[str]** | | [optional] +**custom_label_3** | **[str]** | | [optional] +**custom_label_4** | **[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/CatalogsHotelProductGroupType.md b/docs/CatalogsHotelProductGroupType.md new file mode 100644 index 0000000..7ebd2f6 --- /dev/null +++ b/docs/CatalogsHotelProductGroupType.md @@ -0,0 +1,12 @@ +# CatalogsHotelProductGroupType + +

Catalog hotel product group type

MERCHANT_CREATED: Product groups created by merchants.
ALL_LISTINGS: Includes every hotel item in your catalog. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | <p>Catalog hotel product group type</p> <p>MERCHANT_CREATED: Product groups created by merchants. <br>ALL_LISTINGS: Includes every hotel item in your catalog. | must be one of ["MERCHANT_CREATED", "ALL_LISTINGS", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsHotelReportStatsParameters.md b/docs/CatalogsHotelReportStatsParameters.md new file mode 100644 index 0000000..3567498 --- /dev/null +++ b/docs/CatalogsHotelReportStatsParameters.md @@ -0,0 +1,14 @@ +# CatalogsHotelReportStatsParameters + +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/CatalogsProductGroupFilterOperatorTypeCriteria.md b/docs/CatalogsProductGroupFilterOperatorTypeCriteria.md new file mode 100644 index 0000000..77e06f3 --- /dev/null +++ b/docs/CatalogsProductGroupFilterOperatorTypeCriteria.md @@ -0,0 +1,13 @@ +# CatalogsProductGroupFilterOperatorTypeCriteria + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | **[str]** | | +**negated** | **bool** | | [optional] if omitted the server will use the default value of False +**filter_operator_type** | **str** | | [optional] if omitted the server will use the default value of "IS" + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CatalogsProductGroupUint32Criteria.md b/docs/CatalogsProductGroupUint32Criteria.md new file mode 100644 index 0000000..35c1f02 --- /dev/null +++ b/docs/CatalogsProductGroupUint32Criteria.md @@ -0,0 +1,13 @@ +# CatalogsProductGroupUint32Criteria + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operator** | **str** | | +**value** | **int** | | +**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/CatalogsReportAllItemsFilter.md b/docs/CatalogsReportAllItemsFilter.md new file mode 100644 index 0000000..bab4587 --- /dev/null +++ b/docs/CatalogsReportAllItemsFilter.md @@ -0,0 +1,12 @@ +# CatalogsReportAllItemsFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_type** | **str** | | defaults to "ALL_ITEMS" +**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/CatalogsRetailAvailableFilterValues.md b/docs/CatalogsRetailAvailableFilterValues.md new file mode 100644 index 0000000..0a08d1a --- /dev/null +++ b/docs/CatalogsRetailAvailableFilterValues.md @@ -0,0 +1,13 @@ +# CatalogsRetailAvailableFilterValues + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_values** | [**CatalogsRetailFilterValuesMap**](CatalogsRetailFilterValuesMap.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/CatalogsRetailFilterValuesMap.md b/docs/CatalogsRetailFilterValuesMap.md new file mode 100644 index 0000000..6a49750 --- /dev/null +++ b/docs/CatalogsRetailFilterValuesMap.md @@ -0,0 +1,36 @@ +# CatalogsRetailFilterValuesMap + +A map of filter attributes to their available values. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ad_image_tags** | **[str]** | | [optional] +**ad_video_tags** | **[str]** | | [optional] +**brand** | **[str]** | | [optional] +**custom_label_0** | **[str]** | | [optional] +**custom_label_1** | **[str]** | | [optional] +**custom_label_2** | **[str]** | | [optional] +**custom_label_3** | **[str]** | | [optional] +**custom_label_4** | **[str]** | | [optional] +**google_product_category_0** | **[str]** | | [optional] +**google_product_category_1** | **[str]** | | [optional] +**google_product_category_2** | **[str]** | | [optional] +**google_product_category_3** | **[str]** | | [optional] +**google_product_category_4** | **[str]** | | [optional] +**google_product_category_5** | **[str]** | | [optional] +**google_product_category_6** | **[str]** | | [optional] +**product_type_0** | **[str]** | | [optional] +**product_type_1** | **[str]** | | [optional] +**product_type_2** | **[str]** | | [optional] +**product_type_3** | **[str]** | | [optional] +**product_type_4** | **[str]** | | [optional] +**gender** | **[str]** | | [optional] +**availability** | **[str]** | | [optional] +**media_type** | **[str]** | | [optional] +**condition** | **[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/CatalogsRetailReportStatsParameters.md b/docs/CatalogsRetailReportStatsParameters.md new file mode 100644 index 0000000..4bf30d3 --- /dev/null +++ b/docs/CatalogsRetailReportStatsParameters.md @@ -0,0 +1,14 @@ +# CatalogsRetailReportStatsParameters + +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/ConversionEventAppInfo.md b/docs/ConversionEventAppInfo.md new file mode 100644 index 0000000..1d40d50 --- /dev/null +++ b/docs/ConversionEventAppInfo.md @@ -0,0 +1,20 @@ +# ConversionEventAppInfo + +Object containing information about the application where event occurred. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_name** | **str** | Name of the app. Primarily used for Mobile Apps. | [optional] +**app_package_name** | **str** | App package name | [optional] +**app_id** | **str** | App ID in Google Play Store, AppStore or other stores. | [optional] +**app_version** | **str** | App version. Primarily used for mobile apps | [optional] +**app_store** | **str** | The name of the app distributor or store from which the app was installed. Some options: Samsung Galaxy Store, Google Play Store, Amazon Store, Apple App Store, F-Droid, Aptoide, Obtanium, Huawei AppGallery, Xiaomi Mi GetApps | [optional] +**window_width** | **int** | Inner width of the window or viewport. | [optional] +**window_height** | **int** | Inner height of the window or viewport. | [optional] +**install_time** | **int** | App install time. Unix timestamp in seconds | [optional] +**user_agent** | **str** | User Agent request header. Primarily used for Web events | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConversionEventDeviceInfo.md b/docs/ConversionEventDeviceInfo.md new file mode 100644 index 0000000..8c9ad48 --- /dev/null +++ b/docs/ConversionEventDeviceInfo.md @@ -0,0 +1,35 @@ +# ConversionEventDeviceInfo + +Object containing information about the device where event occurred. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**brand** | **str** | Device brand | [optional] +**type** | **str** | Device type | [optional] +**model** | **str** | Device model name | [optional] +**form_factor** | **str** | Device form factor | [optional] +**os_family** | **str** | OS Family | [optional] +**os_name** | **str** | Short name of the OS. This value if specific to os family. Examples: Windows: 10, 11; Android: 16; iOS: 18; MacOS: 15; Linux: Debian, Ubuntu, Arch | [optional] +**os_version** | **str** | Full name of the version. Examples: iOS: 18.3 Android: 16.1 MacOS: 15.5 Windows: 24H2 Ubuntu Linux: 25.04 | [optional] +**os_release_name** | **str** | Marketing name for the release version iOS: Dawn Android: Baklava MacOS: Sequoia Ubuntu Linux: Plucky Puffin | [optional] +**kernel_version** | **str** | Kernel version. Examples: Linux: 6.15. Obtain by running: uname -r MacOS: 24.3.0. Obtain by running: sysctl kern.version Android: 6.6. Obtain from OS.uname().release | [optional] +**carrier** | **str** | User device's mobile carrier. | [optional] +**screen_width** | **int** | Screen width in pixels | [optional] +**screen_height** | **int** | Screen height in pixels | [optional] +**screen_density** | **int** | Screen density, PPI | [optional] +**cpu_cores** | **int** | Number of CPU cores | [optional] +**storage_size** | **int** | Internal storage size in GB | [optional] +**storage_free_space** | **int** | Internal storage size in GB | [optional] +**external_storage_size** | **int** | External storage size in GB | [optional] +**external_storage_free_space** | **int** | External storage size in GB | [optional] +**locale** | **str** | Device locale BCP-47 format | [optional] +**languages** | **[str]** | List of user installed languages. ISO 639-1 format | [optional] +**timezone** | **str** | Device timezone | [optional] +**timezone_abbr** | **str** | Timezone abbreviation | [optional] +**network_type** | **str** | Network type: 4G, 5G, ethernet, wifi In Android: NetworkCapabilities.getNetworkCapabilities() | [optional] +**battery_level** | **int** | Battery charge level percentage | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConversionEventsUserDataProperties.md b/docs/ConversionEventsUserDataProperties.md new file mode 100644 index 0000000..bcbc0b9 --- /dev/null +++ b/docs/ConversionEventsUserDataProperties.md @@ -0,0 +1,27 @@ +# ConversionEventsUserDataProperties + + +## 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. 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] +**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] +**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/ConversionMSOTEvents.md b/docs/ConversionMSOTEvents.md new file mode 100644 index 0000000..8550cad --- /dev/null +++ b/docs/ConversionMSOTEvents.md @@ -0,0 +1,24 @@ +# ConversionMSOTEvents + +Object containing the MSOT conversion events. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_id** | **str** | A unique id string that identifies this event. If you are already sending us events through Conversions API, then this id should match the event_id sent through Conversions API. | +**event_name** | **str** | Type of user event. | +**event_timestamp** | **int** | The time when the event occurred. Unix timestamp in seconds. | +**ad_group_id** | **str** | The ID of the ad group that was attributed to the conversion event. | +**attribution_scope** | **str** | Ad event type. | +**value** | **float** | Order value of the conversion event. Required if <code>event_name</code> is 'add_to_cart' or 'checkout'. | [optional] +**currency** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**campaign_id** | **str** | The ID of the campaign that was attributed to the conversion event. | [optional] +**action_timestamps** | **[int]** | Timestamp(s) when the ad action(s) happened. Unix timestamp in seconds. | [optional] +**attribution_model** | **str** | The attribution model used to attribute the conversion event. | [optional] +**attribution_score** | **float** | Credit given to the attributed ad actions. Allowed values are > 0 and <= 1. | [optional] +**total_events** | **int** | Total number of conversion events that are reported in one API call. <p>If you are sending one API request for one attributed conversion event then this value should be 1.</p> <p>If you are sending multiple attributed conversion events in one API request then this value should be the total number of attributed conversion events in the request.</p> | [optional] +**total_event_touchpoints** | **int** | Total number of ad events including other non-Pinterest ad platforms. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConversionProductReportRequest.md b/docs/ConversionProductReportRequest.md new file mode 100644 index 0000000..a30f4cd --- /dev/null +++ b/docs/ConversionProductReportRequest.md @@ -0,0 +1,27 @@ +# ConversionProductReportRequest + +Request for a brand, category, SKU report + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**report_name** | **str** | Name of the conversion product report. | +**start_date** | **str** | Metric report start date (UTC). Format: YYYY-MM-DD.<br> Start date must be after 2024-03-16. 7 day minimum time window for report is required. | +**end_date** | **str** | Metric report end date (UTC). Format: YYYY-MM-DD.<br> A max of 1 year is allowed between the start and end date for reports. | +**granularity** | **str** | TOTAL - metrics are aggregated over the specified date range.<br> WEEK - metrics are broken down weekly.<br> MONTH - metrics are broken down monthly. | +**level** | **str** | Level of the report | +**columns** | [**[ConversionProductReportingColumn]**](ConversionProductReportingColumn.md) | Metric and entity columns | +**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 +**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 `30` day. | [optional] if omitted the server will use the default value of 30 +**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" +**conversion_product_breakdown** | **str** | Report breakdown type. This is used to specify the breakdown of the report by brand, category, or SKU. | [optional] if omitted the server will use the default value of "PRODUCT_BRAND" +**conversion_product_attribution_type** | **str** | Required attribution type of the B/C/S report.<br>When the attribution type is BRAND_ATTRIBUTION, start_date for the report must be after 2025-04-01. | [optional] if omitted the server will use the default value of "DEFAULT" +**campaign_objective_types** | [**[ObjectiveType]**](ObjectiveType.md) | List of values for filtering. Default is ['CONSIDERATION','AWARENESS','WEB_CONVERSION','VIDEO_COMPLETION']. | [optional] +**campaign_ids** | **[str]** | List of campaign ids. <br>Only support campaign_ids field when level of the report is CAMPAIGN. | [optional] +**ad_group_ids** | **[str]** | List of ad group ids. <br>Only support ad_group_ids field when level of the report is AD_GROUP. | [optional] +**product_sku_ids** | **[str]** | List of SKU ids. <br>Only support product_sku_ids field when report breakdown type is PRODUCT_SKU_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/ConversionProductReportingColumn.md b/docs/ConversionProductReportingColumn.md new file mode 100644 index 0000000..610ffec --- /dev/null +++ b/docs/ConversionProductReportingColumn.md @@ -0,0 +1,12 @@ +# ConversionProductReportingColumn + +Conversion Product Reporting columns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Conversion Product Reporting columns | must be one of ["CAMPAIGN_NAME", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "CAMPAIGN_OBJECTIVE_TYPE", "AD_GROUP_NAME", "CONVERSION_PRODUCT_ID", "CONVERSION_PRODUCT_BRAND", "CONVERSION_PRODUCT_CATEGORY", "CONVERSION_PRODUCT_ID_GROUP", "TOTAL_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE", "TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomNumber0Filter.md b/docs/CustomNumber0Filter.md new file mode 100644 index 0000000..2b9f3be --- /dev/null +++ b/docs/CustomNumber0Filter.md @@ -0,0 +1,11 @@ +# CustomNumber0Filter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_number_0** | **CatalogsProductGroupUint32Criteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomNumber1Filter.md b/docs/CustomNumber1Filter.md new file mode 100644 index 0000000..0935b10 --- /dev/null +++ b/docs/CustomNumber1Filter.md @@ -0,0 +1,11 @@ +# CustomNumber1Filter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_number_1** | **CatalogsProductGroupUint32Criteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomNumber2Filter.md b/docs/CustomNumber2Filter.md new file mode 100644 index 0000000..b77fe77 --- /dev/null +++ b/docs/CustomNumber2Filter.md @@ -0,0 +1,11 @@ +# CustomNumber2Filter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_number_2** | **CatalogsProductGroupUint32Criteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomNumber3Filter.md b/docs/CustomNumber3Filter.md new file mode 100644 index 0000000..f8721a6 --- /dev/null +++ b/docs/CustomNumber3Filter.md @@ -0,0 +1,11 @@ +# CustomNumber3Filter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_number_3** | **CatalogsProductGroupUint32Criteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomNumber4Filter.md b/docs/CustomNumber4Filter.md new file mode 100644 index 0000000..0a80d48 --- /dev/null +++ b/docs/CustomNumber4Filter.md @@ -0,0 +1,11 @@ +# CustomNumber4Filter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_number_4** | **CatalogsProductGroupUint32Criteria** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md new file mode 100644 index 0000000..4fc9de1 --- /dev/null +++ b/docs/ErrorResponse.md @@ -0,0 +1,13 @@ +# ErrorResponse + + +## 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/GetBusinessAssetsResponseCatalogInfo.md b/docs/GetBusinessAssetsResponseCatalogInfo.md new file mode 100644 index 0000000..bff841e --- /dev/null +++ b/docs/GetBusinessAssetsResponseCatalogInfo.md @@ -0,0 +1,15 @@ +# GetBusinessAssetsResponseCatalogInfo + +An object containing all the information specific to the provided catalog. This field will be populated only if asset_type equals 'CATALOG'. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Catalog ID. | [optional] +**name** | **str** | Catalog name | [optional] +**catalog_type** | **str** | Catalog 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/ImageBase64.md b/docs/ImageBase64.md new file mode 100644 index 0000000..4970708 --- /dev/null +++ b/docs/ImageBase64.md @@ -0,0 +1,14 @@ +# ImageBase64 + +Base64-encoded image media source + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_type** | **str** | | +**data** | **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/InlineObject2.md b/docs/InlineObject2.md new file mode 100644 index 0000000..7b2c90e --- /dev/null +++ b/docs/InlineObject2.md @@ -0,0 +1,17 @@ +# InlineObject2 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Brand Account name | +**username** | **str** | Brand Account username | +**country** | [**Country**](Country.md) | | +**about** | **str** | Brand Account about information | [optional] +**website** | **str** | Brand Account website | [optional] +**profile_image** | [**ImageBase64**](ImageBase64.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/InlineObject3.md b/docs/InlineObject3.md new file mode 100644 index 0000000..cba2b7d --- /dev/null +++ b/docs/InlineObject3.md @@ -0,0 +1,17 @@ +# InlineObject3 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Brand Account name | [optional] +**username** | **str** | Brand Account username | [optional] +**country** | [**Country**](Country.md) | | [optional] +**about** | **str** | Brand Account about information | [optional] +**website** | **str** | Brand Account website | [optional] +**profile_image** | [**ImageBase64**](ImageBase64.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/InlineObject4.md b/docs/InlineObject4.md new file mode 100644 index 0000000..91de0ab --- /dev/null +++ b/docs/InlineObject4.md @@ -0,0 +1,13 @@ +# InlineObject4 + + +## 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/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..5f73039 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,13 @@ +# InlineResponse200 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[LeadSubscription]**](LeadSubscription.md) | | +**bookmark** | **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/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 0000000..5bd8073 --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,12 @@ +# InlineResponse2001 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**brand_account_id** | **str** | id of the newly created brand 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/ItemAttributesRequestAllOf1.md b/docs/ItemAttributesRequestAllOf1.md new file mode 100644 index 0000000..d9a2c54 --- /dev/null +++ b/docs/ItemAttributesRequestAllOf1.md @@ -0,0 +1,51 @@ +# ItemAttributesRequestAllOf1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ad_image_0_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_1_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_2_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_3_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_4_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_5_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_6_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_7_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_8_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_9_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_10_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_11_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_12_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_13_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_14_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_15_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_16_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_17_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_18_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_19_link** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 2000 characters</p> <p>Ad image link that supplements main image for shopping campaigns.</p> <p>Image format:</p> <ul> <li>Pixel size at least 75 x 75</li> </ul> <p>Link guidelines:</p> <ul> <li>Include extension in file name</li> <li>Do not include template or placeholder images in link</li> <li>Make URL accessible to Pinterest user-agent</li> <li>Must start with http:// or https://</li> </ul> | [optional] +**ad_image_0_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_1_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_2_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_3_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_4_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_5_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_6_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_7_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_8_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_9_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_10_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_11_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_12_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_13_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_14_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_15_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_16_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_17_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_18_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</p> | [optional] +**ad_image_19_tag** | **str, none_type** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Restricted</a> <p><= 511 characters</p> <p>If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.</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/Label.md b/docs/Label.md new file mode 100644 index 0000000..7bcc429 --- /dev/null +++ b/docs/Label.md @@ -0,0 +1,17 @@ +# Label + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Label ID. | [optional] +**value** | **str** | Label name. | [optional] +**label_type** | **str** | Label type. | [optional] +**parent_id** | **str** | Label parent entity ID. | [optional] +**parent_type** | **str** | Label parent entity type. | [optional] +**status** | **str** | Label status. | [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/LabelCreateRequest.md b/docs/LabelCreateRequest.md new file mode 100644 index 0000000..eb2f715 --- /dev/null +++ b/docs/LabelCreateRequest.md @@ -0,0 +1,13 @@ +# LabelCreateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | [**[LabelCreateRequestLabels]**](LabelCreateRequestLabels.md) | Labels that you are applying to the campaign. | +**parent_id** | **str** | Unique identifier of the asset you are labelling. Currently, you can only label campaigns. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelCreateRequestLabels.md b/docs/LabelCreateRequestLabels.md new file mode 100644 index 0000000..b106c38 --- /dev/null +++ b/docs/LabelCreateRequestLabels.md @@ -0,0 +1,13 @@ +# LabelCreateRequestLabels + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Label name. 100-character limit. | +**label_type** | [**LabelType**](LabelType.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/LabelError.md b/docs/LabelError.md new file mode 100644 index 0000000..951b3ee --- /dev/null +++ b/docs/LabelError.md @@ -0,0 +1,13 @@ +# LabelError + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Label**](Label.md) | | [optional] +**error_messages** | **[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/LabelParentType.md b/docs/LabelParentType.md new file mode 100644 index 0000000..df90b0b --- /dev/null +++ b/docs/LabelParentType.md @@ -0,0 +1,12 @@ +# LabelParentType + +Label parent entity type. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Label parent entity type. | defaults to "CAMPAIGN", must be one of ["CAMPAIGN", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelStatus.md b/docs/LabelStatus.md new file mode 100644 index 0000000..d667c1a --- /dev/null +++ b/docs/LabelStatus.md @@ -0,0 +1,12 @@ +# LabelStatus + +The new status you want to give the label, either `ACTIVE` (in use) or no longer in use (`ARCHIVED`). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The new status you want to give the label, either `ACTIVE` (in use) or no longer in use (`ARCHIVED`). | must be one of ["ACTIVE", "ARCHIVED", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelType.md b/docs/LabelType.md new file mode 100644 index 0000000..8bf179a --- /dev/null +++ b/docs/LabelType.md @@ -0,0 +1,12 @@ +# LabelType + +Category for the labeled items. Currently, `BRAND` is the only option. You can apply one brand label to a campaign. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Category for the labeled items. Currently, `BRAND` is the only option. You can apply one brand label to a campaign. | defaults to "BRAND", must be one of ["BRAND", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelUpdateRequest.md b/docs/LabelUpdateRequest.md new file mode 100644 index 0000000..5b55a10 --- /dev/null +++ b/docs/LabelUpdateRequest.md @@ -0,0 +1,12 @@ +# LabelUpdateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | [**[LabelUpdateRequestLabels]**](LabelUpdateRequestLabels.md) | Labels that you are applying to the campaign. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelUpdateRequestLabels.md b/docs/LabelUpdateRequestLabels.md new file mode 100644 index 0000000..e8ade03 --- /dev/null +++ b/docs/LabelUpdateRequestLabels.md @@ -0,0 +1,14 @@ +# LabelUpdateRequestLabels + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Label ID. | +**value** | **str** | Label name. 100-character limit. | [optional] +**status** | [**LabelStatus**](LabelStatus.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/LabelsResponse.md b/docs/LabelsResponse.md new file mode 100644 index 0000000..597b551 --- /dev/null +++ b/docs/LabelsResponse.md @@ -0,0 +1,13 @@ +# LabelsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[LabelError]**](LabelError.md) | Labels that were not successfully applied. | [optional] +**labels** | [**[Label]**](Label.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/LeadSubscription.md b/docs/LeadSubscription.md new file mode 100644 index 0000000..d2d8123 --- /dev/null +++ b/docs/LeadSubscription.md @@ -0,0 +1,20 @@ +# LeadSubscription + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Subscription ID. | [optional] +**lead_form_id** | **str, none_type** | Lead form ID. | [optional] +**webhook_url** | **str** | Standard HTTPS webhook URL. | [optional] +**ad_account_id** | **str** | The Ad Account ID that this lead form belongs to. | [optional] +**user_account_id** | **str** | User account used to subscribe lead data. | [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** | 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/LeadSubscriptionPostParamsCreate.md b/docs/LeadSubscriptionPostParamsCreate.md new file mode 100644 index 0000000..4d99c9b --- /dev/null +++ b/docs/LeadSubscriptionPostParamsCreate.md @@ -0,0 +1,16 @@ +# LeadSubscriptionPostParamsCreate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook_url** | **str** | Standard HTTPS webhook URL. | +**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** | **bool, date, datetime, dict, float, int, list, str, none_type** | Partner metadata. Only for clients that requires special handling. We recommend to avoid this param. | [optional] +**lead_form_id** | **str** | Lead form 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/LeadSubscriptionPostParamsCreateAllOf.md b/docs/LeadSubscriptionPostParamsCreateAllOf.md new file mode 100644 index 0000000..73cfe10 --- /dev/null +++ b/docs/LeadSubscriptionPostParamsCreateAllOf.md @@ -0,0 +1,13 @@ +# LeadSubscriptionPostParamsCreateAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook_url** | **str** | Standard HTTPS webhook URL. | +**lead_form_id** | **str** | Lead form 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/Notification.md b/docs/Notification.md new file mode 100644 index 0000000..929bfdd --- /dev/null +++ b/docs/Notification.md @@ -0,0 +1,12 @@ +# Notification + +Any valid JSON object with 1-100 properties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationResponse.md b/docs/NotificationResponse.md new file mode 100644 index 0000000..5d2db46 --- /dev/null +++ b/docs/NotificationResponse.md @@ -0,0 +1,14 @@ +# NotificationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Returns true if the notification accepted. | [optional] +**received_at** | **int** | Received time. Unix timestamp in seconds. | [optional] +**error_msg** | **str** | error message when success is false | [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/Notifications.md b/docs/Notifications.md new file mode 100644 index 0000000..d906889 --- /dev/null +++ b/docs/Notifications.md @@ -0,0 +1,12 @@ +# Notifications + +Array of 1-100 notification objects + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[Notification]**](Notification.md) | Array of 1-100 notification objects | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OauthAccessTokenResponseIntegrationRefreshAllOf.md b/docs/OauthAccessTokenResponseIntegrationRefreshAllOf.md new file mode 100644 index 0000000..96519bd --- /dev/null +++ b/docs/OauthAccessTokenResponseIntegrationRefreshAllOf.md @@ -0,0 +1,13 @@ +# OauthAccessTokenResponseIntegrationRefreshAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**refresh_token** | **str** | | +**refresh_token_expires_in** | **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/OauthAccessTokenResponseRefreshAllOf1.md b/docs/OauthAccessTokenResponseRefreshAllOf1.md new file mode 100644 index 0000000..023d87f --- /dev/null +++ b/docs/OauthAccessTokenResponseRefreshAllOf1.md @@ -0,0 +1,14 @@ +# OauthAccessTokenResponseRefreshAllOf1 + + +## 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/PinMediaBase.md b/docs/PinMediaBase.md new file mode 100644 index 0000000..32eae27 --- /dev/null +++ b/docs/PinMediaBase.md @@ -0,0 +1,13 @@ +# PinMediaBase + +Pin Base objects. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PinterestLibError.md b/docs/PinterestLibError.md new file mode 100644 index 0000000..0436f78 --- /dev/null +++ b/docs/PinterestLibError.md @@ -0,0 +1,14 @@ +# PinterestLibError + +Default error response + +## 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/ProductTag.md b/docs/ProductTag.md new file mode 100644 index 0000000..97b3a20 --- /dev/null +++ b/docs/ProductTag.md @@ -0,0 +1,12 @@ +# ProductTag + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin_id** | **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/PromotionArrayElement.md b/docs/PromotionArrayElement.md new file mode 100644 index 0000000..4250db2 --- /dev/null +++ b/docs/PromotionArrayElement.md @@ -0,0 +1,13 @@ +# PromotionArrayElement + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PromotionResponse**](PromotionResponse.md) | | [optional] +**exception** | [**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/PromotionCommon.md b/docs/PromotionCommon.md new file mode 100644 index 0000000..3a80f04 --- /dev/null +++ b/docs/PromotionCommon.md @@ -0,0 +1,20 @@ +# PromotionCommon + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_id** | **str** | Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest. | [optional] +**platform_type** | **str** | The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'. | [optional] +**promotion_title** | **str** | Internal name for the promotion. | [optional] +**promotion_code** | **str** | Code that can be used to redeem a promotion. | [optional] +**start_time** | **int** | Promotion start time. Unix timestamp in seconds. Independent of campaign start time. | [optional] +**end_time** | **int** | Promotion end time. Unix timestamp in seconds. Independent of campaign end time. | [optional] +**promotion_type** | [**PromotionType**](PromotionType.md) | | [optional] +**template_values** | [**[PromotionTemplateValue]**](PromotionTemplateValue.md) | List of values to be inserted in the promotion type-specific template. | [optional] +**discount_status** | **str** | Discount status based on the current time and start and end time of discount | [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/PromotionCreateRequest.md b/docs/PromotionCreateRequest.md new file mode 100644 index 0000000..dc387c4 --- /dev/null +++ b/docs/PromotionCreateRequest.md @@ -0,0 +1,20 @@ +# PromotionCreateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**promotion_title** | **str** | Internal name for the promotion. | +**promotion_type** | [**PromotionType**](PromotionType.md) | | +**external_id** | **str** | Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest. | [optional] +**platform_type** | **str** | The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'. | [optional] +**promotion_code** | **str** | Code that can be used to redeem a promotion. | [optional] +**start_time** | **int** | Promotion start time. Unix timestamp in seconds. Independent of campaign start time. | [optional] +**end_time** | **int** | Promotion end time. Unix timestamp in seconds. Independent of campaign end time. | [optional] +**template_values** | [**[PromotionTemplateValue]**](PromotionTemplateValue.md) | List of values to be inserted in the promotion type-specific template. | [optional] +**discount_status** | **str** | Discount status based on the current time and start and end time of discount | [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/PromotionResponse.md b/docs/PromotionResponse.md new file mode 100644 index 0000000..feef3ec --- /dev/null +++ b/docs/PromotionResponse.md @@ -0,0 +1,23 @@ +# PromotionResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_id** | **str** | Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest. | [optional] +**platform_type** | **str** | The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'. | [optional] +**promotion_title** | **str** | Internal name for the promotion. | [optional] +**promotion_code** | **str** | Code that can be used to redeem a promotion. | [optional] +**start_time** | **int** | Promotion start time. Unix timestamp in seconds. Independent of campaign start time. | [optional] +**end_time** | **int** | Promotion end time. Unix timestamp in seconds. Independent of campaign end time. | [optional] +**promotion_type** | [**PromotionType**](PromotionType.md) | | [optional] +**template_values** | [**[PromotionTemplateValue]**](PromotionTemplateValue.md) | List of values to be inserted in the promotion type-specific template. | [optional] +**discount_status** | **str** | Discount status based on the current time and start and end time of discount | [optional] +**id** | **str** | Promotion ID | [optional] +**ad_account_id** | **str** | The Ad Account ID that this promotion belongs to. | [optional] +**status** | [**EntityStatus**](EntityStatus.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/PromotionResponseAllOf.md b/docs/PromotionResponseAllOf.md new file mode 100644 index 0000000..e46a567 --- /dev/null +++ b/docs/PromotionResponseAllOf.md @@ -0,0 +1,14 @@ +# PromotionResponseAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Promotion ID | [optional] +**ad_account_id** | **str** | The Ad Account ID that this promotion belongs to. | [optional] +**status** | [**EntityStatus**](EntityStatus.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/PromotionTemplateValue.md b/docs/PromotionTemplateValue.md new file mode 100644 index 0000000..5768086 --- /dev/null +++ b/docs/PromotionTemplateValue.md @@ -0,0 +1,14 @@ +# PromotionTemplateValue + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **float** | Numeric value. | [optional] +**percent** | **float** | Percent value. | [optional] +**currency_code** | [**Currency**](Currency.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/PromotionType.md b/docs/PromotionType.md new file mode 100644 index 0000000..1cba78e --- /dev/null +++ b/docs/PromotionType.md @@ -0,0 +1,12 @@ +# PromotionType + +Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported. | must be one of ["VARIABLE", "SITEWIDE", "CHECKOUT", "SAVE_X_ON_Y", "BUY_X_GET_Y", "SPEND_X_SAVE_Y", "FREE_SHIPPING", "FREE_SHIPPING_MINIMUM", "FREE_SHIPPING_WITH_DISCOUNT", "SITEWIDE_IN_STORES", "EXTRA_PERCENT_OFF", "GIFT_WITH_PURCHASE", "GIFT_WITH_PURCHASE_MINIMUM", "FIXED", "PERCENT_OFF_CLEARANCE", "X_OFF_Y", "GIFT_WITH_FIRST_PURCHASE", "BUY_X_GET_ONE_FREE", "CASH_BACK", "POINTS_ON_ALL_PURCHASES", "BONUS", "POINTS_WITH_PURCHASE", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PromotionUpdateRequest.md b/docs/PromotionUpdateRequest.md new file mode 100644 index 0000000..a3d41c3 --- /dev/null +++ b/docs/PromotionUpdateRequest.md @@ -0,0 +1,22 @@ +# PromotionUpdateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Promotion ID | +**external_id** | **str** | Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest. | [optional] +**platform_type** | **str** | The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'. | [optional] +**promotion_title** | **str** | Internal name for the promotion. | [optional] +**promotion_code** | **str** | Code that can be used to redeem a promotion. | [optional] +**start_time** | **int** | Promotion start time. Unix timestamp in seconds. Independent of campaign start time. | [optional] +**end_time** | **int** | Promotion end time. Unix timestamp in seconds. Independent of campaign end time. | [optional] +**promotion_type** | [**PromotionType**](PromotionType.md) | | [optional] +**template_values** | [**[PromotionTemplateValue]**](PromotionTemplateValue.md) | List of values to be inserted in the promotion type-specific template. | [optional] +**discount_status** | **str** | Discount status based on the current time and start and end time of discount | [optional] +**status** | [**EntityStatus**](EntityStatus.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/PromotionUpdateRequestAllOf.md b/docs/PromotionUpdateRequestAllOf.md new file mode 100644 index 0000000..22c282b --- /dev/null +++ b/docs/PromotionUpdateRequestAllOf.md @@ -0,0 +1,13 @@ +# PromotionUpdateRequestAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Promotion ID | +**status** | [**EntityStatus**](EntityStatus.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/PromotionsResponse.md b/docs/PromotionsResponse.md new file mode 100644 index 0000000..f4f0ec0 --- /dev/null +++ b/docs/PromotionsResponse.md @@ -0,0 +1,12 @@ +# PromotionsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**promotions** | [**[PromotionArrayElement]**](PromotionArrayElement.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/ReportingTimeZone.md b/docs/ReportingTimeZone.md new file mode 100644 index 0000000..db28564 --- /dev/null +++ b/docs/ReportingTimeZone.md @@ -0,0 +1,12 @@ +# ReportingTimeZone + +Closed beta Specify the timezone to be applied for the reporting. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | <a href=\"/docs/getting-started/using-beta-and-restricted-features/\" target=\"blank\" target=\"blank\">Closed beta</a> Specify the timezone to be applied for the reporting. | must be one of ["PINTEREST_TIME_ZONE", "AD_ACCOUNT_TIME_ZONE", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceError.md b/docs/ResourceError.md new file mode 100644 index 0000000..2f6d73e --- /dev/null +++ b/docs/ResourceError.md @@ -0,0 +1,14 @@ +# ResourceError + +Default error response + +## 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/TitleKeywordsFilter.md b/docs/TitleKeywordsFilter.md new file mode 100644 index 0000000..368ee18 --- /dev/null +++ b/docs/TitleKeywordsFilter.md @@ -0,0 +1,11 @@ +# TitleKeywordsFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title_keywords** | **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/TrendingKeyword.md b/docs/TrendingKeyword.md new file mode 100644 index 0000000..bd1f141 --- /dev/null +++ b/docs/TrendingKeyword.md @@ -0,0 +1,16 @@ +# TrendingKeyword + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyword** | **str** | The keyword that is trending. | [optional] +**pct_growth_wow** | **int** | The week-over-week percent change in search volume for this keyword.<br /> For example, a value of \"50\" would represent a 50% increase in searches in the last seven days compared to the week prior.<br /> **Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% week-over-week growth. | [optional] +**pct_growth_mom** | **int** | The month-over-month percent change in search volume for this keyword.<br /> For example, a value of \"400\" would represent a 400% increase in searches in the last 30 days compared to the month prior.<br /> **Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% month-over-month growth. | [optional] +**pct_growth_yoy** | **int** | The year-over-year percent change in search volume for this keyword.<br /> For example, a value of \"-5\" would represent a 5% decrease in searches in the last 365 days compared to the month prior.<br /> **Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% year-over-year growth. | [optional] +**time_series** | **{str: (int,)}** | A sequence of weekly observations of the relative search volume for this keyword over the past year.<br /> These values are normalized to a [0-100] range, and can be used to visualize the history of user interest in this keyword. By default, normalization is applied independently to the time series of each keyword, but the `normalize_against_group` query parameter can be used in cases where you wish to compare relative volume between keywords.<br /> **Note**: The date of each observation is in ISO-8601 format and represents the *end* of the week. For example, a value of `2023-10-31` would include searches that happened between `2023-10-25` and `2023-10-31`. | [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/integration_test/base.py b/integration_test/base.py index 31a689d..a4c33b5 100644 --- a/integration_test/base.py +++ b/integration_test/base.py @@ -94,7 +94,7 @@ def campaign(self): start_time=None, end_time=None, objective_type=ObjectiveType("AWARENESS"), - is_campaign_budget_optimization=False, + is_campaign_budget_optimization=True, is_flexible_daily_budgets=False, default_ad_group_budget_in_micro_currency=None, is_automated_campaign=False, diff --git a/openapi_generated/pinterest_client/__init__.py b/openapi_generated/pinterest_client/__init__.py index 5ce70b3..ec97842 100644 --- a/openapi_generated/pinterest_client/__init__.py +++ b/openapi_generated/pinterest_client/__init__.py @@ -11,7 +11,7 @@ """ -__version__ = "0.1.10" +__version__ = "0.1.11" # import ApiClient from openapi_generated.pinterest_client.api_client import ApiClient diff --git a/openapi_generated/pinterest_client/api_client.py b/openapi_generated/pinterest_client/api_client.py index 01400f7..aff2371 100644 --- a/openapi_generated/pinterest_client/api_client.py +++ b/openapi_generated/pinterest_client/api_client.py @@ -221,7 +221,7 @@ def __call_api( if response_type: if response_type != (file_type,): encoding = "utf-8" - content_type = response_data.getheader('content-type') + content_type = response_data.urllib3_response.headers.get('content-type') if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) if match: @@ -240,7 +240,7 @@ def __call_api( return (return_data) else: return (return_data, response_data.status, - response_data.getheaders()) + response_data.urllib3_response.headers) def parameters_to_multipart(self, params, collection_types): """Get parameters as list of tuples, formatting as json if value is collection_types @@ -317,7 +317,7 @@ def deserialize(self, response, response_type, _check_type): # handle file downloading # save response body into a tmp file and return the instance if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") + content_disposition = response.urllib3_response.headers.get("Content-Disposition") return deserialize_file(response.data, self.configuration, content_disposition=content_disposition) diff --git a/openapi_generated/pinterest_client/configuration.py b/openapi_generated/pinterest_client/configuration.py index 94068b2..a55cd07 100644 --- a/openapi_generated/pinterest_client/configuration.py +++ b/openapi_generated/pinterest_client/configuration.py @@ -426,7 +426,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 5.14.0\n"\ - "SDK Package Version: 0.1.10".\ + "SDK Package Version: 0.1.11".\ 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 12e43bd..1969b22 100644 --- a/openapi_generated/pinterest_client/exceptions.py +++ b/openapi_generated/pinterest_client/exceptions.py @@ -104,7 +104,7 @@ def __init__(self, status=None, reason=None, http_resp=None): self.status = http_resp.status self.reason = http_resp.reason self.body = http_resp.data - self.headers = http_resp.getheaders() + self.headers = http_resp.urllib3_response.headers else: self.status = status self.reason = reason diff --git a/openapi_generated/pinterest_client/model/ad_group_id_filter.py b/openapi_generated/pinterest_client/model/ad_group_id_filter.py new file mode 100644 index 0000000..d0946b1 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_group_id_filter.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 AdGroupIdFilter(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 = { + ('ad_group_ids',): { + 'max_items': 500, + '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 { + 'ad_group_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ad_group_ids': 'ad_group_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AdGroupIdFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_group_ids ([str]): List of ad group ids. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """AdGroupIdFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_group_ids ([str]): List of ad group ids. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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_pin_analytics.py b/openapi_generated/pinterest_client/model/ad_pin_analytics.py new file mode 100644 index 0000000..459750e --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_pin_analytics.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 AdPinAnalytics(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 = { + ('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 + """ + 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_id': (str,), # noqa: E501 + 'date': (date,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pin_id': 'PIN_ID', # noqa: E501 + 'date': 'DATE', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pin_id, *args, **kwargs): # noqa: E501 + """AdPinAnalytics - a model defined in OpenAPI + + Args: + pin_id (str): The ID of the pin that the metric belongs to. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + date (date): Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pin_id = pin_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, pin_id, *args, **kwargs): # noqa: E501 + """AdPinAnalytics - a model defined in OpenAPI + + Args: + pin_id (str): The ID of the pin that the metric belongs to. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + date (date): Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pin_id = pin_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/ad_pins_analytics_response.py b/openapi_generated/pinterest_client/model/ad_pins_analytics_response.py new file mode 100644 index 0000000..5468dd8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_pins_analytics_response.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_pin_analytics import AdPinAnalytics + globals()['AdPinAnalytics'] = AdPinAnalytics + + +class AdPinsAnalyticsResponse(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': ([AdPinAnalytics],), + } + + @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): + """AdPinsAnalyticsResponse - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([AdPinAnalytics]): # noqa: E501 + + Keyword Args: + value ([AdPinAnalytics]): # 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): + """AdPinsAnalyticsResponse - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([AdPinAnalytics]): # noqa: E501 + + Keyword Args: + value ([AdPinAnalytics]): # 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_preview_shopping.py b/openapi_generated/pinterest_client/model/ad_preview_shopping.py new file mode 100644 index 0000000..c768ac9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/ad_preview_shopping.py @@ -0,0 +1,325 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.customizable_cta_type import CustomizableCtaType + globals()['CustomizableCtaType'] = CustomizableCtaType + + +class AdPreviewShopping(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_type',): { + 'SHOPPING': "SHOPPING", + 'CAROUSEL': "CAROUSEL", + 'COLLECTION': "COLLECTION", + }, + ('preferred_media_type',): { + 'VIDEO': "VIDEO", + 'IMAGE': "IMAGE", + }, + } + + validations = { + ('catalog_product_group_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('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 { + 'catalog_product_group_id': (str,), # noqa: E501 + 'creative_type': (str,), # noqa: E501 + 'customizable_cta_type': (CustomizableCtaType,), # noqa: E501 + 'image_tag': (str,), # noqa: E501 + 'video_tag': (str,), # noqa: E501 + 'preferred_media_type': (str,), # noqa: E501 + 'hero_pin_id': (str,), # noqa: E501 + 'hero_image_url': (str,), # noqa: E501 + 'hero_image_title': (str,), # noqa: E501 + 'item_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_product_group_id': 'catalog_product_group_id', # noqa: E501 + 'creative_type': 'creative_type', # noqa: E501 + 'customizable_cta_type': 'customizable_cta_type', # noqa: E501 + 'image_tag': 'image_tag', # noqa: E501 + 'video_tag': 'video_tag', # noqa: E501 + 'preferred_media_type': 'preferred_media_type', # noqa: E501 + 'hero_pin_id': 'hero_pin_id', # noqa: E501 + 'hero_image_url': 'hero_image_url', # noqa: E501 + 'hero_image_title': 'hero_image_title', # noqa: E501 + 'item_id': 'item_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, catalog_product_group_id, creative_type, *args, **kwargs): # noqa: E501 + """AdPreviewShopping - a model defined in OpenAPI + + Args: + catalog_product_group_id (str): Catalog Product Group Id. + creative_type (str): Ad format of the shopping ad preview. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customizable_cta_type (CustomizableCtaType): [optional] # noqa: E501 + image_tag (str): Multi image template tag.. [optional] # noqa: E501 + video_tag (str): Multi video template tag, image_tag and video_tag are mutual exclusive.. [optional] # noqa: E501 + preferred_media_type (str): Preferred media type.. [optional] # noqa: E501 + hero_pin_id (str): Pin id for the hero image. When creative type is COLLECTION, either hero_pin_id or (hero_image_url, hero_image_title) is required.. [optional] # noqa: E501 + hero_image_url (str): Hero image URL.. [optional] # noqa: E501 + hero_image_title (str): Title displayed below ad.. [optional] # noqa: E501 + item_id (str): Item id for product to preview standard shopping ads, optional and only applicable when creative type is SHOPPING.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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_product_group_id = catalog_product_group_id + self.creative_type = creative_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_product_group_id, creative_type, *args, **kwargs): # noqa: E501 + """AdPreviewShopping - a model defined in OpenAPI + + Args: + catalog_product_group_id (str): Catalog Product Group Id. + creative_type (str): Ad format of the shopping ad preview. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customizable_cta_type (CustomizableCtaType): [optional] # noqa: E501 + image_tag (str): Multi image template tag.. [optional] # noqa: E501 + video_tag (str): Multi video template tag, image_tag and video_tag are mutual exclusive.. [optional] # noqa: E501 + preferred_media_type (str): Preferred media type.. [optional] # noqa: E501 + hero_pin_id (str): Pin id for the hero image. When creative type is COLLECTION, either hero_pin_id or (hero_image_url, hero_image_title) is required.. [optional] # noqa: E501 + hero_image_url (str): Hero image URL.. [optional] # noqa: E501 + hero_image_title (str): Title displayed below ad.. [optional] # noqa: E501 + item_id (str): Item id for product to preview standard shopping ads, optional and only applicable when creative type is SHOPPING.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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_product_group_id = catalog_product_group_id + self.creative_type = creative_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/ads_analytics_ad_group_targeting_type.py b/openapi_generated/pinterest_client/model/ads_analytics_ad_group_targeting_type.py new file mode 100644 index 0000000..303b37e --- /dev/null +++ b/openapi_generated/pinterest_client/model/ads_analytics_ad_group_targeting_type.py @@ -0,0 +1,295 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 AdsAnalyticsAdGroupTargetingType(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", + 'AGE_BUCKET_AND_GENDER': "AGE_BUCKET_AND_GENDER", + 'CREATIVE_ENHANCEMENTS': "CREATIVE_ENHANCEMENTS", + }, + } + + 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): + """AdsAnalyticsAdGroupTargetingType - 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 ad groups., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", "CREATIVE_ENHANCEMENTS", ] # noqa: E501 + + Keyword Args: + value (str): Reporting targeting type for ad groups., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", "CREATIVE_ENHANCEMENTS", ] # 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): + """AdsAnalyticsAdGroupTargetingType - 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 ad groups., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", "CREATIVE_ENHANCEMENTS", ] # noqa: E501 + + Keyword Args: + value (str): Reporting targeting type for ad groups., must be one of ["KEYWORD", "APPTYPE", "GENDER", "LOCATION", "PLACEMENT", "COUNTRY", "TARGETED_INTEREST", "PINNER_INTEREST", "AUDIENCE_INCLUDE", "GEO", "AGE_BUCKET", "REGION", "AGE_BUCKET_AND_GENDER", "CREATIVE_ENHANCEMENTS", ] # 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/all_of.py b/openapi_generated/pinterest_client/model/all_of.py new file mode 100644 index 0000000..7e0edf7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/all_of.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_filter_keys import CatalogsProductGroupFilterKeys + globals()['CatalogsProductGroupFilterKeys'] = CatalogsProductGroupFilterKeys + + +class AllOf(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 = { + ('all_of',): { + '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 { + 'all_of': ([CatalogsProductGroupFilterKeys],), # 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 + """AllOf - a model defined in OpenAPI + + Args: + all_of ([CatalogsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 + """AllOf - a model defined in OpenAPI + + Args: + all_of ([CatalogsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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/any_of.py b/openapi_generated/pinterest_client/model/any_of.py new file mode 100644 index 0000000..57e5af4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/any_of.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_filter_keys import CatalogsProductGroupFilterKeys + globals()['CatalogsProductGroupFilterKeys'] = CatalogsProductGroupFilterKeys + + +class AnyOf(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 = { + ('any_of',): { + '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 { + 'any_of': ([CatalogsProductGroupFilterKeys],), # 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 + """AnyOf - a model defined in OpenAPI + + Args: + any_of ([CatalogsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 + """AnyOf - a model defined in OpenAPI + + Args: + any_of ([CatalogsProductGroupFilterKeys]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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/audience_definition_scope.py b/openapi_generated/pinterest_client/model/audience_definition_scope.py new file mode 100644 index 0000000..91f2649 --- /dev/null +++ b/openapi_generated/pinterest_client/model/audience_definition_scope.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 AudienceDefinitionScope(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 = { + ('scope',): { + 'PARTNER': "PARTNER", + 'PINTEREST': "PINTEREST", + }, + } + + 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, *args, **kwargs): # noqa: E501 + """AudienceDefinitionScope - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + scope (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 + """AudienceDefinitionScope - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + scope (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/audience_definition_type.py b/openapi_generated/pinterest_client/model/audience_definition_type.py new file mode 100644 index 0000000..1b89a10 --- /dev/null +++ b/openapi_generated/pinterest_client/model/audience_definition_type.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 AudienceDefinitionType(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 = { + ('scope',): { + 'IMPRESSION_PLUS_ENGAGEMENT': "IMPRESSION_PLUS_ENGAGEMENT", + 'ENGAGEMENT': "ENGAGEMENT", + }, + } + + 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, *args, **kwargs): # noqa: E501 + """AudienceDefinitionType - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + scope (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 + """AudienceDefinitionType - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + scope (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/billing_invoice_download_response.py b/openapi_generated/pinterest_client/model/billing_invoice_download_response.py new file mode 100644 index 0000000..0ab8178 --- /dev/null +++ b/openapi_generated/pinterest_client/model/billing_invoice_download_response.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 BillingInvoiceDownloadResponse(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 { + 'id': (str,), # noqa: E501 + 'download_url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # 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 + """BillingInvoiceDownloadResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): The billing invoice id. [optional] # noqa: E501 + download_url (str): The download url for the billing invoice. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """BillingInvoiceDownloadResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): The billing invoice id. [optional] # noqa: E501 + download_url (str): The download url for the billing invoice. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/billing_invoice_response.py b/openapi_generated/pinterest_client/model/billing_invoice_response.py new file mode 100644 index 0000000..b043b76 --- /dev/null +++ b/openapi_generated/pinterest_client/model/billing_invoice_response.py @@ -0,0 +1,351 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 BillingInvoiceResponse(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 = { + ('document_type',): { + 'INVOICE': "INVOICE", + 'CREDIT_MEMO': "CREDIT_MEMO", + }, + ('status',): { + 'OPEN': "OPEN", + 'CLOSED': "CLOSED", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('billing_period_start_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('billing_period_end_date',): { + 'regex': { + 'pattern': r'^(\d{4})-(\d{2})-(\d{2})$', # noqa: E501 + }, + }, + ('invoice_due_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 { + 'id': (str,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'ad_account_name': (str,), # noqa: E501 + 'document_type': (str,), # noqa: E501 + 'amount_billed_micro_currency': (int,), # noqa: E501 + 'amount_tax_micro_currency': (int, none_type,), # noqa: E501 + 'amount_net_micro_currency': (int, none_type,), # noqa: E501 + 'amount_discount_micro_currency': (int, none_type,), # noqa: E501 + 'currency': (Currency,), # noqa: E501 + 'billing_period_start_date': (date,), # noqa: E501 + 'billing_period_end_date': (date,), # noqa: E501 + 'invoice_due_date': (date,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'payment_terms': (str,), # noqa: E501 + 'bill_to_country': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'ad_account_name': 'ad_account_name', # noqa: E501 + 'document_type': 'document_type', # noqa: E501 + 'amount_billed_micro_currency': 'amount_billed_micro_currency', # noqa: E501 + 'amount_tax_micro_currency': 'amount_tax_micro_currency', # noqa: E501 + 'amount_net_micro_currency': 'amount_net_micro_currency', # noqa: E501 + 'amount_discount_micro_currency': 'amount_discount_micro_currency', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'billing_period_start_date': 'billing_period_start_date', # noqa: E501 + 'billing_period_end_date': 'billing_period_end_date', # noqa: E501 + 'invoice_due_date': 'invoice_due_date', # noqa: E501 + 'status': 'status', # noqa: E501 + 'payment_terms': 'payment_terms', # noqa: E501 + 'bill_to_country': 'bill_to_country', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BillingInvoiceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 for the billing invoice. [optional] # noqa: E501 + ad_account_id (str): The ID of the ad account this invoice belongs to. [optional] # noqa: E501 + ad_account_name (str): The name of the ad account this invoice belongs to. [optional] # noqa: E501 + document_type (str): The type of the document. [optional] # noqa: E501 + amount_billed_micro_currency (int): The amount billed in this invoice. Denoted in micro currency. [optional] # noqa: E501 + amount_tax_micro_currency (int, none_type): The tax in this invoice. Denoted in micro currency. [optional] # noqa: E501 + amount_net_micro_currency (int, none_type): The net amount in this invoice. Denoted in micro currency. [optional] # noqa: E501 + amount_discount_micro_currency (int, none_type): The discount in this invoice. Denoted in micro currency. [optional] # noqa: E501 + currency (Currency): [optional] # noqa: E501 + billing_period_start_date (date): The start date of the billing period. Format: YYYY-MM-DD. [optional] # noqa: E501 + billing_period_end_date (date): The end date of the billing period. Format: YYYY-MM-DD. [optional] # noqa: E501 + invoice_due_date (date): The date the invoice is due. Format: YYYY-MM-DD. [optional] # noqa: E501 + status (str): The status of the invoice. [optional] # noqa: E501 + payment_terms (str): The payment terms of the invoice. [optional] # noqa: E501 + bill_to_country (str): The country of the bill to address. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """BillingInvoiceResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 for the billing invoice. [optional] # noqa: E501 + ad_account_id (str): The ID of the ad account this invoice belongs to. [optional] # noqa: E501 + ad_account_name (str): The name of the ad account this invoice belongs to. [optional] # noqa: E501 + document_type (str): The type of the document. [optional] # noqa: E501 + amount_billed_micro_currency (int): The amount billed in this invoice. Denoted in micro currency. [optional] # noqa: E501 + amount_tax_micro_currency (int, none_type): The tax in this invoice. Denoted in micro currency. [optional] # noqa: E501 + amount_net_micro_currency (int, none_type): The net amount in this invoice. Denoted in micro currency. [optional] # noqa: E501 + amount_discount_micro_currency (int, none_type): The discount in this invoice. Denoted in micro currency. [optional] # noqa: E501 + currency (Currency): [optional] # noqa: E501 + billing_period_start_date (date): The start date of the billing period. Format: YYYY-MM-DD. [optional] # noqa: E501 + billing_period_end_date (date): The end date of the billing period. Format: YYYY-MM-DD. [optional] # noqa: E501 + invoice_due_date (date): The date the invoice is due. Format: YYYY-MM-DD. [optional] # noqa: E501 + status (str): The status of the invoice. [optional] # noqa: E501 + payment_terms (str): The payment terms of the invoice. [optional] # noqa: E501 + bill_to_country (str): The country of the bill to address. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/campaign_audience_multipliers.py b/openapi_generated/pinterest_client/model/campaign_audience_multipliers.py new file mode 100644 index 0000000..8945169 --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_audience_multipliers.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CampaignAudienceMultipliers(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 + """ + return (float,) # 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_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_id': 'AUDIENCE_ID', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CampaignAudienceMultipliers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """CampaignAudienceMultipliers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/campaign_bid_options.py b/openapi_generated/pinterest_client/model/campaign_bid_options.py new file mode 100644 index 0000000..68f40ba --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_bid_options.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.campaign_audience_multipliers import CampaignAudienceMultipliers + from openapi_generated.pinterest_client.model.placement_multipliers import PlacementMultipliers + globals()['AppTypeMultipliers'] = AppTypeMultipliers + globals()['CampaignAudienceMultipliers'] = CampaignAudienceMultipliers + globals()['PlacementMultipliers'] = PlacementMultipliers + + +class CampaignBidOptions(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_multipliers': (CampaignAudienceMultipliers,), # noqa: E501 + 'app_type_multipliers': (AppTypeMultipliers,), # noqa: E501 + 'placement_multipliers': (PlacementMultipliers,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_multipliers': 'audience_multipliers', # 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 + """CampaignBidOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_multipliers (CampaignAudienceMultipliers): [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 + """CampaignBidOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_multipliers (CampaignAudienceMultipliers): [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/campaign_bid_options_create.py b/openapi_generated/pinterest_client/model/campaign_bid_options_create.py new file mode 100644 index 0000000..67168fb --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_bid_options_create.py @@ -0,0 +1,326 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.campaign_audience_multipliers import CampaignAudienceMultipliers + from openapi_generated.pinterest_client.model.campaign_bid_options import CampaignBidOptions + from openapi_generated.pinterest_client.model.placement_multipliers import PlacementMultipliers + globals()['AppTypeMultipliers'] = AppTypeMultipliers + globals()['CampaignAudienceMultipliers'] = CampaignAudienceMultipliers + globals()['CampaignBidOptions'] = CampaignBidOptions + globals()['PlacementMultipliers'] = PlacementMultipliers + + +class CampaignBidOptionsCreate(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_multipliers': (CampaignAudienceMultipliers,), # noqa: E501 + 'app_type_multipliers': (AppTypeMultipliers,), # noqa: E501 + 'placement_multipliers': (PlacementMultipliers,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audience_multipliers': 'audience_multipliers', # noqa: E501 + 'app_type_multipliers': 'app_type_multipliers', # noqa: E501 + 'placement_multipliers': 'placement_multipliers', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CampaignBidOptionsCreate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_multipliers (CampaignAudienceMultipliers): [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__,) + + 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 + """CampaignBidOptionsCreate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_multipliers (CampaignAudienceMultipliers): [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__,) + + 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/campaign_bid_options_update.py b/openapi_generated/pinterest_client/model/campaign_bid_options_update.py new file mode 100644 index 0000000..040cd5c --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_bid_options_update.py @@ -0,0 +1,339 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.campaign_audience_multipliers import CampaignAudienceMultipliers + from openapi_generated.pinterest_client.model.campaign_bid_options import CampaignBidOptions + from openapi_generated.pinterest_client.model.campaign_bid_options_update_all_of import CampaignBidOptionsUpdateAllOf + from openapi_generated.pinterest_client.model.placement_multipliers import PlacementMultipliers + globals()['AppTypeMultipliers'] = AppTypeMultipliers + globals()['CampaignAudienceMultipliers'] = CampaignAudienceMultipliers + globals()['CampaignBidOptions'] = CampaignBidOptions + globals()['CampaignBidOptionsUpdateAllOf'] = CampaignBidOptionsUpdateAllOf + globals()['PlacementMultipliers'] = PlacementMultipliers + + +class CampaignBidOptionsUpdate(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 = { + ('update_mask',): { + 'AUDIENCE': "AUDIENCE", + 'APP_TYPE': "APP_TYPE", + 'PLACEMENT': "PLACEMENT", + 'GENDER': "GENDER", + 'AGE_BUCKET': "AGE_BUCKET", + }, + } + + 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': ([str],), # noqa: E501 + 'audience_multipliers': (CampaignAudienceMultipliers,), # noqa: E501 + 'app_type_multipliers': (AppTypeMultipliers,), # noqa: E501 + 'placement_multipliers': (PlacementMultipliers,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'update_mask': 'update_mask', # noqa: E501 + 'audience_multipliers': 'audience_multipliers', # noqa: E501 + 'app_type_multipliers': 'app_type_multipliers', # noqa: E501 + 'placement_multipliers': 'placement_multipliers', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CampaignBidOptionsUpdate - a model defined in OpenAPI + + Keyword Args: + update_mask ([str]): List of fields to update, only the fields in the list will 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,) + audience_multipliers (CampaignAudienceMultipliers): [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__,) + + 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 + """CampaignBidOptionsUpdate - a model defined in OpenAPI + + Keyword Args: + update_mask ([str]): List of fields to update, only the fields in the list will 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,) + audience_multipliers (CampaignAudienceMultipliers): [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__,) + + 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/campaign_bid_options_update_all_of.py b/openapi_generated/pinterest_client/model/campaign_bid_options_update_all_of.py new file mode 100644 index 0000000..c25b720 --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_bid_options_update_all_of.py @@ -0,0 +1,269 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CampaignBidOptionsUpdateAllOf(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 = { + ('update_mask',): { + 'AUDIENCE': "AUDIENCE", + 'APP_TYPE': "APP_TYPE", + 'PLACEMENT': "PLACEMENT", + 'GENDER': "GENDER", + 'AGE_BUCKET': "AGE_BUCKET", + }, + } + + 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 { + 'update_mask': ([str],), # 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 + """CampaignBidOptionsUpdateAllOf - a model defined in OpenAPI + + Args: + update_mask ([str]): List of fields to update, only the fields in the list will 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.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 + """CampaignBidOptionsUpdateAllOf - a model defined in OpenAPI + + Args: + update_mask ([str]): List of fields to update, only the fields in the list will 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.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/campaign_id_filter.py b/openapi_generated/pinterest_client/model/campaign_id_filter.py new file mode 100644 index 0000000..b8524a1 --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_id_filter.py @@ -0,0 +1,260 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CampaignIdFilter(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 = { + ('campaign_ids',): { + 'max_items': 500, + '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 { + 'campaign_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'campaign_ids': 'campaign_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CampaignIdFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + campaign_ids ([str]): List of campaign ids. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """CampaignIdFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + campaign_ids ([str]): List of campaign ids. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/campaign_objectives_filter.py b/openapi_generated/pinterest_client/model/campaign_objectives_filter.py new file mode 100644 index 0000000..ae6de30 --- /dev/null +++ b/openapi_generated/pinterest_client/model/campaign_objectives_filter.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.objective_type import ObjectiveType + globals()['ObjectiveType'] = ObjectiveType + + +class CampaignObjectivesFilter(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 = { + ('campaign_objective_types',): { + 'max_items': 7, + '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 { + 'campaign_objective_types': ([ObjectiveType],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'campaign_objective_types': 'campaign_objective_types', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CampaignObjectivesFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + campaign_objective_types ([ObjectiveType]): List of values for filtering. [\"WEB_SESSIONS\"] in BETA.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """CampaignObjectivesFilter - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + campaign_objective_types ([ObjectiveType]): List of values for filtering. [\"WEB_SESSIONS\"] in BETA.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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_available_filter_values.py b/openapi_generated/pinterest_client/model/catalogs_available_filter_values.py new file mode 100644 index 0000000..0e8c307 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_available_filter_values.py @@ -0,0 +1,340 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_available_filter_values import CatalogsCreativeAssetsAvailableFilterValues + from openapi_generated.pinterest_client.model.catalogs_creative_assets_filter_values_map import CatalogsCreativeAssetsFilterValuesMap + from openapi_generated.pinterest_client.model.catalogs_hotel_available_filter_values import CatalogsHotelAvailableFilterValues + from openapi_generated.pinterest_client.model.catalogs_retail_available_filter_values import CatalogsRetailAvailableFilterValues + globals()['CatalogsCreativeAssetsAvailableFilterValues'] = CatalogsCreativeAssetsAvailableFilterValues + globals()['CatalogsCreativeAssetsFilterValuesMap'] = CatalogsCreativeAssetsFilterValuesMap + globals()['CatalogsHotelAvailableFilterValues'] = CatalogsHotelAvailableFilterValues + globals()['CatalogsRetailAvailableFilterValues'] = CatalogsRetailAvailableFilterValues + + +class CatalogsAvailableFilterValues(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 + 'filter_values': (CatalogsCreativeAssetsFilterValuesMap,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'CREATIVE_ASSETS': CatalogsCreativeAssetsAvailableFilterValues, + 'CatalogsCreativeAssetsAvailableFilterValues': CatalogsCreativeAssetsAvailableFilterValues, + 'CatalogsHotelAvailableFilterValues': CatalogsHotelAvailableFilterValues, + 'CatalogsRetailAvailableFilterValues': CatalogsRetailAvailableFilterValues, + 'HOTEL': CatalogsHotelAvailableFilterValues, + 'RETAIL': CatalogsRetailAvailableFilterValues, + } + if not val: + return None + return {'catalog_type': val} + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'filter_values': 'filter_values', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsAvailableFilterValues - 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,) + filter_values (CatalogsCreativeAssetsFilterValuesMap): [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 + """CatalogsAvailableFilterValues - 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,) + filter_values (CatalogsCreativeAssetsFilterValuesMap): [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': [ + CatalogsCreativeAssetsAvailableFilterValues, + CatalogsHotelAvailableFilterValues, + CatalogsRetailAvailableFilterValues, + ], + } diff --git a/openapi_generated/pinterest_client/model/catalogs_creative_assets_available_filter_values.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_available_filter_values.py new file mode 100644 index 0000000..e117690 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_available_filter_values.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_filter_values_map import CatalogsCreativeAssetsFilterValuesMap + globals()['CatalogsCreativeAssetsFilterValuesMap'] = CatalogsCreativeAssetsFilterValuesMap + + +class CatalogsCreativeAssetsAvailableFilterValues(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 + 'filter_values': (CatalogsCreativeAssetsFilterValuesMap,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'filter_values': 'filter_values', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, filter_values, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsAvailableFilterValues - a model defined in OpenAPI + + Args: + filter_values (CatalogsCreativeAssetsFilterValuesMap): + + 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.filter_values = filter_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, filter_values, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsAvailableFilterValues - a model defined in OpenAPI + + Args: + filter_values (CatalogsCreativeAssetsFilterValuesMap): + + 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.filter_values = filter_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_creative_assets_filter_values_map.py b/openapi_generated/pinterest_client/model/catalogs_creative_assets_filter_values_map.py new file mode 100644 index 0000000..15c383f --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_creative_assets_filter_values_map.py @@ -0,0 +1,308 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsCreativeAssetsFilterValuesMap(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 = { + ('media_type',): { + 'IMAGE': "IMAGE", + 'VIDEO': "VIDEO", + }, + } + + 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 { + 'custom_label_0': ([str],), # noqa: E501 + 'custom_label_1': ([str],), # noqa: E501 + 'custom_label_2': ([str],), # noqa: E501 + 'custom_label_3': ([str],), # noqa: E501 + 'custom_label_4': ([str],), # noqa: E501 + 'google_product_category_0': ([str],), # noqa: E501 + 'google_product_category_1': ([str],), # noqa: E501 + 'google_product_category_2': ([str],), # noqa: E501 + 'google_product_category_3': ([str],), # noqa: E501 + 'google_product_category_4': ([str],), # noqa: E501 + 'google_product_category_5': ([str],), # noqa: E501 + 'google_product_category_6': ([str],), # noqa: E501 + 'media_type': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '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_0': 'google_product_category_0', # noqa: E501 + 'google_product_category_1': 'google_product_category_1', # noqa: E501 + 'google_product_category_2': 'google_product_category_2', # noqa: E501 + 'google_product_category_3': 'google_product_category_3', # noqa: E501 + 'google_product_category_4': 'google_product_category_4', # noqa: E501 + 'google_product_category_5': 'google_product_category_5', # noqa: E501 + 'google_product_category_6': 'google_product_category_6', # noqa: E501 + 'media_type': 'media_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsCreativeAssetsFilterValuesMap - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + custom_label_0 ([str]): [optional] # noqa: E501 + custom_label_1 ([str]): [optional] # noqa: E501 + custom_label_2 ([str]): [optional] # noqa: E501 + custom_label_3 ([str]): [optional] # noqa: E501 + custom_label_4 ([str]): [optional] # noqa: E501 + google_product_category_0 ([str]): [optional] # noqa: E501 + google_product_category_1 ([str]): [optional] # noqa: E501 + google_product_category_2 ([str]): [optional] # noqa: E501 + google_product_category_3 ([str]): [optional] # noqa: E501 + google_product_category_4 ([str]): [optional] # noqa: E501 + google_product_category_5 ([str]): [optional] # noqa: E501 + google_product_category_6 ([str]): [optional] # noqa: E501 + media_type ([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 + """CatalogsCreativeAssetsFilterValuesMap - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + custom_label_0 ([str]): [optional] # noqa: E501 + custom_label_1 ([str]): [optional] # noqa: E501 + custom_label_2 ([str]): [optional] # noqa: E501 + custom_label_3 ([str]): [optional] # noqa: E501 + custom_label_4 ([str]): [optional] # noqa: E501 + google_product_category_0 ([str]): [optional] # noqa: E501 + google_product_category_1 ([str]): [optional] # noqa: E501 + google_product_category_2 ([str]): [optional] # noqa: E501 + google_product_category_3 ([str]): [optional] # noqa: E501 + google_product_category_4 ([str]): [optional] # noqa: E501 + google_product_category_5 ([str]): [optional] # noqa: E501 + google_product_category_6 ([str]): [optional] # noqa: E501 + media_type ([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/catalogs_hotel_available_filter_values.py b/openapi_generated/pinterest_client/model/catalogs_hotel_available_filter_values.py new file mode 100644 index 0000000..7dfbb33 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_available_filter_values.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_filter_values_map import CatalogsHotelFilterValuesMap + globals()['CatalogsHotelFilterValuesMap'] = CatalogsHotelFilterValuesMap + + +class CatalogsHotelAvailableFilterValues(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 + 'filter_values': (CatalogsHotelFilterValuesMap,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'filter_values': 'filter_values', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, filter_values, *args, **kwargs): # noqa: E501 + """CatalogsHotelAvailableFilterValues - a model defined in OpenAPI + + Args: + filter_values (CatalogsHotelFilterValuesMap): + + 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.filter_values = filter_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, filter_values, *args, **kwargs): # noqa: E501 + """CatalogsHotelAvailableFilterValues - a model defined in OpenAPI + + Args: + filter_values (CatalogsHotelFilterValuesMap): + + 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.filter_values = filter_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_hotel_filter_values_map.py b/openapi_generated/pinterest_client/model/catalogs_hotel_filter_values_map.py new file mode 100644 index 0000000..bc61c40 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_filter_values_map.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsHotelFilterValuesMap(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 { + 'brand': ([str],), # noqa: E501 + 'custom_label_0': ([str],), # noqa: E501 + 'custom_label_1': ([str],), # noqa: E501 + 'custom_label_2': ([str],), # noqa: E501 + 'custom_label_3': ([str],), # noqa: E501 + 'custom_label_4': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '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 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsHotelFilterValuesMap - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brand ([str]): [optional] # noqa: E501 + custom_label_0 ([str]): [optional] # noqa: E501 + custom_label_1 ([str]): [optional] # noqa: E501 + custom_label_2 ([str]): [optional] # noqa: E501 + custom_label_3 ([str]): [optional] # noqa: E501 + custom_label_4 ([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 + """CatalogsHotelFilterValuesMap - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brand ([str]): [optional] # noqa: E501 + custom_label_0 ([str]): [optional] # noqa: E501 + custom_label_1 ([str]): [optional] # noqa: E501 + custom_label_2 ([str]): [optional] # noqa: E501 + custom_label_3 ([str]): [optional] # noqa: E501 + custom_label_4 ([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/catalogs_hotel_product_group_type.py b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_type.py new file mode 100644 index 0000000..bbabf1e --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_product_group_type.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsHotelProductGroupType(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',): { + 'MERCHANT_CREATED': "MERCHANT_CREATED", + 'ALL_LISTINGS': "ALL_LISTINGS", + }, + } + + 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): + """CatalogsHotelProductGroupType - 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):

Catalog hotel product group type

MERCHANT_CREATED: Product groups created by merchants.
ALL_LISTINGS: Includes every hotel item in your catalog.., must be one of ["MERCHANT_CREATED", "ALL_LISTINGS", ] # noqa: E501 + + Keyword Args: + value (str):

Catalog hotel product group type

MERCHANT_CREATED: Product groups created by merchants.
ALL_LISTINGS: Includes every hotel item in your catalog.., must be one of ["MERCHANT_CREATED", "ALL_LISTINGS", ] # 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): + """CatalogsHotelProductGroupType - 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):

Catalog hotel product group type

MERCHANT_CREATED: Product groups created by merchants.
ALL_LISTINGS: Includes every hotel item in your catalog.., must be one of ["MERCHANT_CREATED", "ALL_LISTINGS", ] # noqa: E501 + + Keyword Args: + value (str):

Catalog hotel product group type

MERCHANT_CREATED: Product groups created by merchants.
ALL_LISTINGS: Includes every hotel item in your catalog.., must be one of ["MERCHANT_CREATED", "ALL_LISTINGS", ] # 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_hotel_report_stats_parameters.py b/openapi_generated/pinterest_client/model/catalogs_hotel_report_stats_parameters.py new file mode 100644 index 0000000..b17ec6a --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_hotel_report_stats_parameters.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsHotelReportStatsParameters(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 + """CatalogsHotelReportStatsParameters - 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 + """CatalogsHotelReportStatsParameters - 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_product_group_filter_operator_type_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_filter_operator_type_criteria.py new file mode 100644 index 0000000..c22d03b --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_filter_operator_type_criteria.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsProductGroupFilterOperatorTypeCriteria(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 = { + ('filter_operator_type',): { + 'IS': "IS", + 'CONTAINS': "CONTAINS", + }, + } + + 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 { + 'values': ([str],), # noqa: E501 + 'negated': (bool,), # noqa: E501 + 'filter_operator_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'values': 'values', # noqa: E501 + 'negated': 'negated', # noqa: E501 + 'filter_operator_type': 'filter_operator_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, values, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupFilterOperatorTypeCriteria - a model defined in OpenAPI + + Args: + values ([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,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + filter_operator_type (str): [optional] if omitted the server will use the default value of "IS" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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 + """CatalogsProductGroupFilterOperatorTypeCriteria - a model defined in OpenAPI + + Args: + values ([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,) + negated (bool): [optional] if omitted the server will use the default value of False # noqa: E501 + filter_operator_type (str): [optional] if omitted the server will use the default value of "IS" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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_uint32_criteria.py b/openapi_generated/pinterest_client/model/catalogs_product_group_uint32_criteria.py new file mode 100644 index 0000000..3bb7ab5 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_product_group_uint32_criteria.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsProductGroupUint32Criteria(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_maximum': 4294967295, + 'inclusive_minimum': 0, + }, + } + + 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 { + 'operator': (str,), # noqa: E501 + 'value': (int,), # noqa: E501 + 'negated': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'operator': 'operator', # noqa: E501 + 'value': 'value', # 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, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupUint32Criteria - a model defined in OpenAPI + + Args: + operator (str): + value (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,) + 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 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, *args, **kwargs): # noqa: E501 + """CatalogsProductGroupUint32Criteria - a model defined in OpenAPI + + Args: + operator (str): + value (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,) + 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 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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_all_items_filter.py b/openapi_generated/pinterest_client/model/catalogs_report_all_items_filter.py new file mode 100644 index 0000000..df7169d --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_report_all_items_filter.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsReportAllItemsFilter(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',): { + 'ALL_ITEMS': "ALL_ITEMS", + }, + } + + 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 + """CatalogsReportAllItemsFilter - a model defined in OpenAPI + + Args: + + Keyword Args: + report_type (str): defaults to "ALL_ITEMS", must be one of ["ALL_ITEMS", ] # 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', "ALL_ITEMS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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 + """CatalogsReportAllItemsFilter - a model defined in OpenAPI + + Args: + + Keyword Args: + report_type (str): defaults to "ALL_ITEMS", must be one of ["ALL_ITEMS", ] # 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', "ALL_ITEMS") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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_retail_available_filter_values.py b/openapi_generated/pinterest_client/model/catalogs_retail_available_filter_values.py new file mode 100644 index 0000000..62fd72f --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_available_filter_values.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_filter_values_map import CatalogsRetailFilterValuesMap + globals()['CatalogsRetailFilterValuesMap'] = CatalogsRetailFilterValuesMap + + +class CatalogsRetailAvailableFilterValues(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 + 'filter_values': (CatalogsRetailFilterValuesMap,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'catalog_type': 'catalog_type', # noqa: E501 + 'filter_values': 'filter_values', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, filter_values, *args, **kwargs): # noqa: E501 + """CatalogsRetailAvailableFilterValues - a model defined in OpenAPI + + Args: + filter_values (CatalogsRetailFilterValuesMap): + + 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.filter_values = filter_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, filter_values, *args, **kwargs): # noqa: E501 + """CatalogsRetailAvailableFilterValues - a model defined in OpenAPI + + Args: + filter_values (CatalogsRetailFilterValuesMap): + + 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.filter_values = filter_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_retail_filter_values_map.py b/openapi_generated/pinterest_client/model/catalogs_retail_filter_values_map.py new file mode 100644 index 0000000..706d909 --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_filter_values_map.py @@ -0,0 +1,368 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsRetailFilterValuesMap(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 = { + ('gender',): { + 'FEMALE': "FEMALE", + 'MALE': "MALE", + 'UNISEX': "UNISEX", + }, + ('availability',): { + 'IN_STOCK': "IN_STOCK", + 'OUT_OF_STOCK': "OUT_OF_STOCK", + 'PREORDER': "PREORDER", + 'UNAVAILABLE': "UNAVAILABLE", + }, + ('media_type',): { + 'IMAGE': "IMAGE", + 'VIDEO': "VIDEO", + }, + ('condition',): { + 'NEW': "NEW", + 'USED': "USED", + 'REFURBISHED': "REFURBISHED", + }, + } + + 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 { + 'ad_image_tags': ([str],), # noqa: E501 + 'ad_video_tags': ([str],), # noqa: E501 + 'brand': ([str],), # noqa: E501 + 'custom_label_0': ([str],), # noqa: E501 + 'custom_label_1': ([str],), # noqa: E501 + 'custom_label_2': ([str],), # noqa: E501 + 'custom_label_3': ([str],), # noqa: E501 + 'custom_label_4': ([str],), # noqa: E501 + 'google_product_category_0': ([str],), # noqa: E501 + 'google_product_category_1': ([str],), # noqa: E501 + 'google_product_category_2': ([str],), # noqa: E501 + 'google_product_category_3': ([str],), # noqa: E501 + 'google_product_category_4': ([str],), # noqa: E501 + 'google_product_category_5': ([str],), # noqa: E501 + 'google_product_category_6': ([str],), # noqa: E501 + 'product_type_0': ([str],), # noqa: E501 + 'product_type_1': ([str],), # noqa: E501 + 'product_type_2': ([str],), # noqa: E501 + 'product_type_3': ([str],), # noqa: E501 + 'product_type_4': ([str],), # noqa: E501 + 'gender': ([str],), # noqa: E501 + 'availability': ([str],), # noqa: E501 + 'media_type': ([str],), # noqa: E501 + 'condition': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ad_image_tags': 'ad_image_tags', # noqa: E501 + 'ad_video_tags': 'ad_video_tags', # 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 + 'google_product_category_0': 'google_product_category_0', # noqa: E501 + 'google_product_category_1': 'google_product_category_1', # noqa: E501 + 'google_product_category_2': 'google_product_category_2', # noqa: E501 + 'google_product_category_3': 'google_product_category_3', # noqa: E501 + 'google_product_category_4': 'google_product_category_4', # noqa: E501 + 'google_product_category_5': 'google_product_category_5', # noqa: E501 + 'google_product_category_6': 'google_product_category_6', # noqa: E501 + 'product_type_0': 'product_type_0', # noqa: E501 + 'product_type_1': 'product_type_1', # noqa: E501 + 'product_type_2': 'product_type_2', # noqa: E501 + 'product_type_3': 'product_type_3', # noqa: E501 + 'product_type_4': 'product_type_4', # noqa: E501 + 'gender': 'gender', # noqa: E501 + 'availability': 'availability', # noqa: E501 + 'media_type': 'media_type', # noqa: E501 + 'condition': 'condition', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CatalogsRetailFilterValuesMap - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_image_tags ([str]): [optional] # noqa: E501 + ad_video_tags ([str]): [optional] # noqa: E501 + brand ([str]): [optional] # noqa: E501 + custom_label_0 ([str]): [optional] # noqa: E501 + custom_label_1 ([str]): [optional] # noqa: E501 + custom_label_2 ([str]): [optional] # noqa: E501 + custom_label_3 ([str]): [optional] # noqa: E501 + custom_label_4 ([str]): [optional] # noqa: E501 + google_product_category_0 ([str]): [optional] # noqa: E501 + google_product_category_1 ([str]): [optional] # noqa: E501 + google_product_category_2 ([str]): [optional] # noqa: E501 + google_product_category_3 ([str]): [optional] # noqa: E501 + google_product_category_4 ([str]): [optional] # noqa: E501 + google_product_category_5 ([str]): [optional] # noqa: E501 + google_product_category_6 ([str]): [optional] # noqa: E501 + product_type_0 ([str]): [optional] # noqa: E501 + product_type_1 ([str]): [optional] # noqa: E501 + product_type_2 ([str]): [optional] # noqa: E501 + product_type_3 ([str]): [optional] # noqa: E501 + product_type_4 ([str]): [optional] # noqa: E501 + gender ([str]): [optional] # noqa: E501 + availability ([str]): [optional] # noqa: E501 + media_type ([str]): [optional] # noqa: E501 + condition ([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 + """CatalogsRetailFilterValuesMap - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_image_tags ([str]): [optional] # noqa: E501 + ad_video_tags ([str]): [optional] # noqa: E501 + brand ([str]): [optional] # noqa: E501 + custom_label_0 ([str]): [optional] # noqa: E501 + custom_label_1 ([str]): [optional] # noqa: E501 + custom_label_2 ([str]): [optional] # noqa: E501 + custom_label_3 ([str]): [optional] # noqa: E501 + custom_label_4 ([str]): [optional] # noqa: E501 + google_product_category_0 ([str]): [optional] # noqa: E501 + google_product_category_1 ([str]): [optional] # noqa: E501 + google_product_category_2 ([str]): [optional] # noqa: E501 + google_product_category_3 ([str]): [optional] # noqa: E501 + google_product_category_4 ([str]): [optional] # noqa: E501 + google_product_category_5 ([str]): [optional] # noqa: E501 + google_product_category_6 ([str]): [optional] # noqa: E501 + product_type_0 ([str]): [optional] # noqa: E501 + product_type_1 ([str]): [optional] # noqa: E501 + product_type_2 ([str]): [optional] # noqa: E501 + product_type_3 ([str]): [optional] # noqa: E501 + product_type_4 ([str]): [optional] # noqa: E501 + gender ([str]): [optional] # noqa: E501 + availability ([str]): [optional] # noqa: E501 + media_type ([str]): [optional] # noqa: E501 + condition ([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/catalogs_retail_report_stats_parameters.py b/openapi_generated/pinterest_client/model/catalogs_retail_report_stats_parameters.py new file mode 100644 index 0000000..6f4dcfa --- /dev/null +++ b/openapi_generated/pinterest_client/model/catalogs_retail_report_stats_parameters.py @@ -0,0 +1,281 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 CatalogsRetailReportStatsParameters(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 + """CatalogsRetailReportStatsParameters - 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 + """CatalogsRetailReportStatsParameters - 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/conversion_event_app_info.py b/openapi_generated/pinterest_client/model/conversion_event_app_info.py new file mode 100644 index 0000000..f1e44e7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/conversion_event_app_info.py @@ -0,0 +1,311 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ConversionEventAppInfo(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 = { + ('app_name',): { + 'max_length': 200, + }, + ('app_package_name',): { + 'max_length': 200, + }, + ('app_id',): { + 'max_length': 200, + }, + ('app_version',): { + 'max_length': 100, + }, + ('app_store',): { + 'max_length': 100, + }, + ('window_width',): { + 'inclusive_maximum': 30720, + 'inclusive_minimum': 0, + }, + ('window_height',): { + 'inclusive_maximum': 30720, + 'inclusive_minimum': 0, + }, + ('install_time',): { + 'inclusive_minimum': 0, + }, + ('user_agent',): { + 'max_length': 16384, + }, + } + + 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 { + 'app_name': (str,), # noqa: E501 + 'app_package_name': (str,), # noqa: E501 + 'app_id': (str,), # noqa: E501 + 'app_version': (str,), # noqa: E501 + 'app_store': (str,), # noqa: E501 + 'window_width': (int,), # noqa: E501 + 'window_height': (int,), # noqa: E501 + 'install_time': (int,), # noqa: E501 + 'user_agent': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'app_name': 'app_name', # noqa: E501 + 'app_package_name': 'app_package_name', # noqa: E501 + 'app_id': 'app_id', # noqa: E501 + 'app_version': 'app_version', # noqa: E501 + 'app_store': 'app_store', # noqa: E501 + 'window_width': 'window_width', # noqa: E501 + 'window_height': 'window_height', # noqa: E501 + 'install_time': 'install_time', # noqa: E501 + 'user_agent': 'user_agent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConversionEventAppInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_name (str): Name of the app. Primarily used for Mobile Apps.. [optional] # noqa: E501 + app_package_name (str): App package name. [optional] # noqa: E501 + app_id (str): App ID in Google Play Store, AppStore or other stores.. [optional] # noqa: E501 + app_version (str): App version. Primarily used for mobile apps. [optional] # noqa: E501 + app_store (str): The name of the app distributor or store from which the app was installed. Some options: Samsung Galaxy Store, Google Play Store, Amazon Store, Apple App Store, F-Droid, Aptoide, Obtanium, Huawei AppGallery, Xiaomi Mi GetApps. [optional] # noqa: E501 + window_width (int): Inner width of the window or viewport.. [optional] # noqa: E501 + window_height (int): Inner height of the window or viewport.. [optional] # noqa: E501 + install_time (int): App install time. Unix timestamp in seconds. [optional] # noqa: E501 + user_agent (str): User Agent request header. Primarily used for Web events. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """ConversionEventAppInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_name (str): Name of the app. Primarily used for Mobile Apps.. [optional] # noqa: E501 + app_package_name (str): App package name. [optional] # noqa: E501 + app_id (str): App ID in Google Play Store, AppStore or other stores.. [optional] # noqa: E501 + app_version (str): App version. Primarily used for mobile apps. [optional] # noqa: E501 + app_store (str): The name of the app distributor or store from which the app was installed. Some options: Samsung Galaxy Store, Google Play Store, Amazon Store, Apple App Store, F-Droid, Aptoide, Obtanium, Huawei AppGallery, Xiaomi Mi GetApps. [optional] # noqa: E501 + window_width (int): Inner width of the window or viewport.. [optional] # noqa: E501 + window_height (int): Inner height of the window or viewport.. [optional] # noqa: E501 + install_time (int): App install time. Unix timestamp in seconds. [optional] # noqa: E501 + user_agent (str): User Agent request header. Primarily used for Web events. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/conversion_event_device_info.py b/openapi_generated/pinterest_client/model/conversion_event_device_info.py new file mode 100644 index 0000000..c5173ef --- /dev/null +++ b/openapi_generated/pinterest_client/model/conversion_event_device_info.py @@ -0,0 +1,445 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ConversionEventDeviceInfo(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 = { + ('form_factor',): { + 'DESKTOP': "desktop", + 'LAPTOP': "laptop", + 'CELLPHONE': "cellphone", + 'TABLET': "tablet", + 'SMARTWATCH': "smartwatch", + 'TV': "tv", + 'VR': "vr", + 'CONSOLE': "console", + 'OTHER': "other", + }, + ('os_family',): { + 'IOS': "ios", + 'ANDROID': "android", + 'MACOS': "macos", + 'WINDOWS': "windows", + 'LINUX': "linux", + 'BSD': "bsd", + 'OTHER': "other", + }, + ('network_type',): { + 'WIFI': "wifi", + 'CELLULAR_2G': "cellular_2g", + 'CELLULAR_3G': "cellular_3g", + 'CELLULAR_4G': "cellular_4g", + 'CELLULAR_5G': "cellular_5g", + 'CELLULAR_6G': "cellular_6g", + 'ETHERNET': "ethernet", + 'UNKNOWN': "unknown", + }, + } + + validations = { + ('brand',): { + 'max_length': 100, + }, + ('type',): { + 'max_length': 100, + }, + ('model',): { + 'max_length': 100, + }, + ('os_name',): { + 'max_length': 100, + }, + ('os_version',): { + 'max_length': 100, + }, + ('os_release_name',): { + 'max_length': 100, + }, + ('kernel_version',): { + 'max_length': 100, + }, + ('carrier',): { + 'max_length': 100, + }, + ('screen_width',): { + 'inclusive_maximum': 30720, + 'inclusive_minimum': 0, + }, + ('screen_height',): { + 'inclusive_maximum': 30720, + 'inclusive_minimum': 0, + }, + ('screen_density',): { + 'inclusive_maximum': 100000, + 'inclusive_minimum': 0, + }, + ('cpu_cores',): { + 'inclusive_maximum': 1152, + 'inclusive_minimum': 0, + }, + ('storage_size',): { + 'inclusive_maximum': 1048576, + 'inclusive_minimum': 0, + }, + ('storage_free_space',): { + 'inclusive_maximum': 1048576, + 'inclusive_minimum': 0, + }, + ('external_storage_size',): { + 'inclusive_maximum': 1048576, + 'inclusive_minimum': 0, + }, + ('external_storage_free_space',): { + 'inclusive_maximum': 1048576, + 'inclusive_minimum': 0, + }, + ('locale',): { + 'max_length': 35, + }, + ('languages',): { + 'max_items': 100, + 'min_items': 0, + }, + ('timezone',): { + 'max_length': 40, + }, + ('timezone_abbr',): { + 'max_length': 5, + }, + ('battery_level',): { + 'inclusive_maximum': 100, + 'inclusive_minimum': 0, + }, + } + + 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 { + 'brand': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'model': (str,), # noqa: E501 + 'form_factor': (str,), # noqa: E501 + 'os_family': (str,), # noqa: E501 + 'os_name': (str,), # noqa: E501 + 'os_version': (str,), # noqa: E501 + 'os_release_name': (str,), # noqa: E501 + 'kernel_version': (str,), # noqa: E501 + 'carrier': (str,), # noqa: E501 + 'screen_width': (int,), # noqa: E501 + 'screen_height': (int,), # noqa: E501 + 'screen_density': (int,), # noqa: E501 + 'cpu_cores': (int,), # noqa: E501 + 'storage_size': (int,), # noqa: E501 + 'storage_free_space': (int,), # noqa: E501 + 'external_storage_size': (int,), # noqa: E501 + 'external_storage_free_space': (int,), # noqa: E501 + 'locale': (str,), # noqa: E501 + 'languages': ([str],), # noqa: E501 + 'timezone': (str,), # noqa: E501 + 'timezone_abbr': (str,), # noqa: E501 + 'network_type': (str,), # noqa: E501 + 'battery_level': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'brand': 'brand', # noqa: E501 + 'type': 'type', # noqa: E501 + 'model': 'model', # noqa: E501 + 'form_factor': 'form_factor', # noqa: E501 + 'os_family': 'os_family', # noqa: E501 + 'os_name': 'os_name', # noqa: E501 + 'os_version': 'os_version', # noqa: E501 + 'os_release_name': 'os_release_name', # noqa: E501 + 'kernel_version': 'kernel_version', # noqa: E501 + 'carrier': 'carrier', # noqa: E501 + 'screen_width': 'screen_width', # noqa: E501 + 'screen_height': 'screen_height', # noqa: E501 + 'screen_density': 'screen_density', # noqa: E501 + 'cpu_cores': 'cpu_cores', # noqa: E501 + 'storage_size': 'storage_size', # noqa: E501 + 'storage_free_space': 'storage_free_space', # noqa: E501 + 'external_storage_size': 'external_storage_size', # noqa: E501 + 'external_storage_free_space': 'external_storage_free_space', # noqa: E501 + 'locale': 'locale', # noqa: E501 + 'languages': 'languages', # noqa: E501 + 'timezone': 'timezone', # noqa: E501 + 'timezone_abbr': 'timezone_abbr', # noqa: E501 + 'network_type': 'network_type', # noqa: E501 + 'battery_level': 'battery_level', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConversionEventDeviceInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brand (str): Device brand. [optional] # noqa: E501 + type (str): Device type. [optional] # noqa: E501 + model (str): Device model name. [optional] # noqa: E501 + form_factor (str): Device form factor. [optional] # noqa: E501 + os_family (str): OS Family. [optional] # noqa: E501 + os_name (str): Short name of the OS. This value if specific to os family. Examples: Windows: 10, 11; Android: 16; iOS: 18; MacOS: 15; Linux: Debian, Ubuntu, Arch. [optional] # noqa: E501 + os_version (str): Full name of the version. Examples: iOS: 18.3 Android: 16.1 MacOS: 15.5 Windows: 24H2 Ubuntu Linux: 25.04. [optional] # noqa: E501 + os_release_name (str): Marketing name for the release version iOS: Dawn Android: Baklava MacOS: Sequoia Ubuntu Linux: Plucky Puffin. [optional] # noqa: E501 + kernel_version (str): Kernel version. Examples: Linux: 6.15. Obtain by running: uname -r MacOS: 24.3.0. Obtain by running: sysctl kern.version Android: 6.6. Obtain from OS.uname().release. [optional] # noqa: E501 + carrier (str): User device's mobile carrier.. [optional] # noqa: E501 + screen_width (int): Screen width in pixels. [optional] # noqa: E501 + screen_height (int): Screen height in pixels. [optional] # noqa: E501 + screen_density (int): Screen density, PPI. [optional] # noqa: E501 + cpu_cores (int): Number of CPU cores. [optional] # noqa: E501 + storage_size (int): Internal storage size in GB. [optional] # noqa: E501 + storage_free_space (int): Internal storage size in GB. [optional] # noqa: E501 + external_storage_size (int): External storage size in GB. [optional] # noqa: E501 + external_storage_free_space (int): External storage size in GB. [optional] # noqa: E501 + locale (str): Device locale BCP-47 format. [optional] # noqa: E501 + languages ([str]): List of user installed languages. ISO 639-1 format. [optional] # noqa: E501 + timezone (str): Device timezone. [optional] # noqa: E501 + timezone_abbr (str): Timezone abbreviation. [optional] # noqa: E501 + network_type (str): Network type: 4G, 5G, ethernet, wifi In Android: NetworkCapabilities.getNetworkCapabilities(). [optional] # noqa: E501 + battery_level (int): Battery charge level percentage. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """ConversionEventDeviceInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brand (str): Device brand. [optional] # noqa: E501 + type (str): Device type. [optional] # noqa: E501 + model (str): Device model name. [optional] # noqa: E501 + form_factor (str): Device form factor. [optional] # noqa: E501 + os_family (str): OS Family. [optional] # noqa: E501 + os_name (str): Short name of the OS. This value if specific to os family. Examples: Windows: 10, 11; Android: 16; iOS: 18; MacOS: 15; Linux: Debian, Ubuntu, Arch. [optional] # noqa: E501 + os_version (str): Full name of the version. Examples: iOS: 18.3 Android: 16.1 MacOS: 15.5 Windows: 24H2 Ubuntu Linux: 25.04. [optional] # noqa: E501 + os_release_name (str): Marketing name for the release version iOS: Dawn Android: Baklava MacOS: Sequoia Ubuntu Linux: Plucky Puffin. [optional] # noqa: E501 + kernel_version (str): Kernel version. Examples: Linux: 6.15. Obtain by running: uname -r MacOS: 24.3.0. Obtain by running: sysctl kern.version Android: 6.6. Obtain from OS.uname().release. [optional] # noqa: E501 + carrier (str): User device's mobile carrier.. [optional] # noqa: E501 + screen_width (int): Screen width in pixels. [optional] # noqa: E501 + screen_height (int): Screen height in pixels. [optional] # noqa: E501 + screen_density (int): Screen density, PPI. [optional] # noqa: E501 + cpu_cores (int): Number of CPU cores. [optional] # noqa: E501 + storage_size (int): Internal storage size in GB. [optional] # noqa: E501 + storage_free_space (int): Internal storage size in GB. [optional] # noqa: E501 + external_storage_size (int): External storage size in GB. [optional] # noqa: E501 + external_storage_free_space (int): External storage size in GB. [optional] # noqa: E501 + locale (str): Device locale BCP-47 format. [optional] # noqa: E501 + languages ([str]): List of user installed languages. ISO 639-1 format. [optional] # noqa: E501 + timezone (str): Device timezone. [optional] # noqa: E501 + timezone_abbr (str): Timezone abbreviation. [optional] # noqa: E501 + network_type (str): Network type: 4G, 5G, ethernet, wifi In Android: NetworkCapabilities.getNetworkCapabilities(). [optional] # noqa: E501 + battery_level (int): Battery charge level percentage. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/conversion_events_user_data_properties.py b/openapi_generated/pinterest_client/model/conversion_events_user_data_properties.py new file mode 100644 index 0000000..f4cd487 --- /dev/null +++ b/openapi_generated/pinterest_client/model/conversion_events_user_data_properties.py @@ -0,0 +1,316 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ConversionEventsUserDataProperties(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 { + 'em': ([str],), # noqa: E501 + 'hashed_maids': ([str],), # noqa: E501 + 'client_ip_address': (str,), # noqa: E501 + 'client_user_agent': (str,), # noqa: E501 + 'ph': ([str],), # noqa: E501 + 'ge': ([str],), # noqa: E501 + 'db': ([str],), # noqa: E501 + 'ln': ([str],), # noqa: E501 + 'fn': ([str],), # noqa: E501 + 'ct': ([str],), # noqa: E501 + 'st': ([str],), # noqa: E501 + 'zp': ([str],), # noqa: E501 + '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 + def discriminator(): + return None + + + attribute_map = { + 'em': 'em', # noqa: E501 + 'hashed_maids': 'hashed_maids', # noqa: E501 + 'client_ip_address': 'client_ip_address', # noqa: E501 + 'client_user_agent': 'client_user_agent', # noqa: E501 + 'ph': 'ph', # noqa: E501 + 'ge': 'ge', # noqa: E501 + 'db': 'db', # noqa: E501 + 'ln': 'ln', # noqa: E501 + 'fn': 'fn', # noqa: E501 + 'ct': 'ct', # noqa: E501 + 'st': 'st', # noqa: E501 + 'zp': 'zp', # noqa: E501 + '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 = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConversionEventsUserDataProperties - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + 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. 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 + 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 + 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) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """ConversionEventsUserDataProperties - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + 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. 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 + 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 + 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) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/conversion_msot_events.py b/openapi_generated/pinterest_client/model/conversion_msot_events.py new file mode 100644 index 0000000..e5dad07 --- /dev/null +++ b/openapi_generated/pinterest_client/model/conversion_msot_events.py @@ -0,0 +1,356 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ConversionMSOTEvents(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_name',): { + 'ADD_TO_CART': "add_to_cart", + 'CHECKOUT': "checkout", + 'LEAD': "lead", + 'SIGNUP': "signup", + }, + ('attribution_scope',): { + 'VIEW': "view", + 'ENGAGEMENT': "engagement", + 'CLICK': "click", + }, + ('attribution_model',): { + 'FIRST_TOUCH': "first_touch", + 'LAST_TOUCH': "last_touch", + 'MULTI_TOUCH': "multi_touch", + }, + } + + validations = { + ('event_id',): { + 'max_length': 256, + }, + ('ad_group_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('campaign_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('attribution_score',): { + 'inclusive_maximum': 1, + 'exclusive_minimum''inclusive_minimum': 0, + }, + ('total_events',): { + 'inclusive_minimum': 1, + }, + ('total_event_touchpoints',): { + 'inclusive_minimum': 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 { + 'event_id': (str,), # noqa: E501 + 'event_name': (str,), # noqa: E501 + 'event_timestamp': (int,), # noqa: E501 + 'ad_group_id': (str,), # noqa: E501 + 'attribution_scope': (str,), # noqa: E501 + 'value': (float,), # noqa: E501 + 'currency': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'campaign_id': (str,), # noqa: E501 + 'action_timestamps': ([int],), # noqa: E501 + 'attribution_model': (str,), # noqa: E501 + 'attribution_score': (float,), # noqa: E501 + 'total_events': (int,), # noqa: E501 + 'total_event_touchpoints': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'event_id': 'event_id', # noqa: E501 + 'event_name': 'event_name', # noqa: E501 + 'event_timestamp': 'event_timestamp', # noqa: E501 + 'ad_group_id': 'ad_group_id', # noqa: E501 + 'attribution_scope': 'attribution_scope', # noqa: E501 + 'value': 'value', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'campaign_id': 'campaign_id', # noqa: E501 + 'action_timestamps': 'action_timestamps', # noqa: E501 + 'attribution_model': 'attribution_model', # noqa: E501 + 'attribution_score': 'attribution_score', # noqa: E501 + 'total_events': 'total_events', # noqa: E501 + 'total_event_touchpoints': 'total_event_touchpoints', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, event_id, event_name, event_timestamp, ad_group_id, attribution_scope, *args, **kwargs): # noqa: E501 + """ConversionMSOTEvents - a model defined in OpenAPI + + Args: + event_id (str): A unique id string that identifies this event. If you are already sending us events through Conversions API, then this id should match the event_id sent through Conversions API. + event_name (str): Type of user event. + event_timestamp (int): The time when the event occurred. Unix timestamp in seconds. + ad_group_id (str): The ID of the ad group that was attributed to the conversion event. + attribution_scope (str): Ad event 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,) + value (float): Order value of the conversion event. Required if event_name is 'add_to_cart' or 'checkout'.. [optional] # noqa: E501 + currency (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + campaign_id (str): The ID of the campaign that was attributed to the conversion event.. [optional] # noqa: E501 + action_timestamps ([int]): Timestamp(s) when the ad action(s) happened. Unix timestamp in seconds.. [optional] # noqa: E501 + attribution_model (str): The attribution model used to attribute the conversion event.. [optional] # noqa: E501 + attribution_score (float): Credit given to the attributed ad actions. Allowed values are > 0 and <= 1.. [optional] # noqa: E501 + total_events (int): Total number of conversion events that are reported in one API call.

If you are sending one API request for one attributed conversion event then this value should be 1.

If you are sending multiple attributed conversion events in one API request then this value should be the total number of attributed conversion events in the request.

. [optional] # noqa: E501 + total_event_touchpoints (int): Total number of ad events including other non-Pinterest ad platforms.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.event_id = event_id + self.event_name = event_name + self.event_timestamp = event_timestamp + self.ad_group_id = ad_group_id + self.attribution_scope = attribution_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, event_id, event_name, event_timestamp, ad_group_id, attribution_scope, *args, **kwargs): # noqa: E501 + """ConversionMSOTEvents - a model defined in OpenAPI + + Args: + event_id (str): A unique id string that identifies this event. If you are already sending us events through Conversions API, then this id should match the event_id sent through Conversions API. + event_name (str): Type of user event. + event_timestamp (int): The time when the event occurred. Unix timestamp in seconds. + ad_group_id (str): The ID of the ad group that was attributed to the conversion event. + attribution_scope (str): Ad event 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,) + value (float): Order value of the conversion event. Required if event_name is 'add_to_cart' or 'checkout'.. [optional] # noqa: E501 + currency (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + campaign_id (str): The ID of the campaign that was attributed to the conversion event.. [optional] # noqa: E501 + action_timestamps ([int]): Timestamp(s) when the ad action(s) happened. Unix timestamp in seconds.. [optional] # noqa: E501 + attribution_model (str): The attribution model used to attribute the conversion event.. [optional] # noqa: E501 + attribution_score (float): Credit given to the attributed ad actions. Allowed values are > 0 and <= 1.. [optional] # noqa: E501 + total_events (int): Total number of conversion events that are reported in one API call.

If you are sending one API request for one attributed conversion event then this value should be 1.

If you are sending multiple attributed conversion events in one API request then this value should be the total number of attributed conversion events in the request.

. [optional] # noqa: E501 + total_event_touchpoints (int): Total number of ad events including other non-Pinterest ad platforms.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.event_id = event_id + self.event_name = event_name + self.event_timestamp = event_timestamp + self.ad_group_id = ad_group_id + self.attribution_scope = attribution_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/conversion_product_report_request.py b/openapi_generated/pinterest_client/model/conversion_product_report_request.py new file mode 100644 index 0000000..10bc225 --- /dev/null +++ b/openapi_generated/pinterest_client/model/conversion_product_report_request.py @@ -0,0 +1,380 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.conversion_attribution_window_days import ConversionAttributionWindowDays + from openapi_generated.pinterest_client.model.conversion_product_reporting_column import ConversionProductReportingColumn + from openapi_generated.pinterest_client.model.conversion_report_time_type import ConversionReportTimeType + from openapi_generated.pinterest_client.model.objective_type import ObjectiveType + globals()['ConversionAttributionWindowDays'] = ConversionAttributionWindowDays + globals()['ConversionProductReportingColumn'] = ConversionProductReportingColumn + globals()['ConversionReportTimeType'] = ConversionReportTimeType + globals()['ObjectiveType'] = ObjectiveType + + +class ConversionProductReportRequest(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 = { + ('granularity',): { + 'WEEK': "WEEK", + 'MONTH': "MONTH", + 'TOTAL': "TOTAL", + }, + ('level',): { + 'ADVERTISER': "ADVERTISER", + 'CAMPAIGN': "CAMPAIGN", + 'AD_GROUP': "AD_GROUP", + }, + ('conversion_product_attribution_type',): { + 'DEFAULT': "DEFAULT", + 'BRAND_ATTRIBUTION': "BRAND_ATTRIBUTION", + }, + } + + 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 + }, + }, + ('campaign_objective_types',): { + 'max_items': 7, + 'min_items': 1, + }, + ('campaign_ids',): { + 'max_items': 500, + 'min_items': 1, + }, + ('ad_group_ids',): { + 'max_items': 500, + 'min_items': 1, + }, + ('product_sku_ids',): { + 'max_items': 500, + 'min_items': 2, + }, + } + + @cached_property + def additional_properties_type(): + """ + 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_name': (str,), # noqa: E501 + 'start_date': (str,), # noqa: E501 + 'end_date': (str,), # noqa: E501 + 'granularity': (str,), # noqa: E501 + 'level': (str,), # noqa: E501 + 'columns': ([ConversionProductReportingColumn],), # noqa: E501 + 'click_window_days': (int,), # noqa: E501 + 'view_window_days': (int,), # noqa: E501 + 'conversion_report_time': (str,), # noqa: E501 + 'conversion_product_breakdown': (str,), # noqa: E501 + 'conversion_product_attribution_type': (str,), # noqa: E501 + 'campaign_objective_types': ([ObjectiveType],), # noqa: E501 + 'campaign_ids': ([str],), # noqa: E501 + 'ad_group_ids': ([str],), # noqa: E501 + 'product_sku_ids': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'report_name': 'report_name', # noqa: E501 + 'start_date': 'start_date', # noqa: E501 + 'end_date': 'end_date', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + 'level': 'level', # noqa: E501 + 'columns': 'columns', # noqa: E501 + 'click_window_days': 'click_window_days', # noqa: E501 + 'view_window_days': 'view_window_days', # noqa: E501 + 'conversion_report_time': 'conversion_report_time', # noqa: E501 + 'conversion_product_breakdown': 'conversion_product_breakdown', # noqa: E501 + 'conversion_product_attribution_type': 'conversion_product_attribution_type', # noqa: E501 + 'campaign_objective_types': 'campaign_objective_types', # noqa: E501 + 'campaign_ids': 'campaign_ids', # noqa: E501 + 'ad_group_ids': 'ad_group_ids', # noqa: E501 + 'product_sku_ids': 'product_sku_ids', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, report_name, start_date, end_date, granularity, level, columns, *args, **kwargs): # noqa: E501 + """ConversionProductReportRequest - a model defined in OpenAPI + + Args: + report_name (str): Name of the conversion product report. + start_date (str): Metric report start date (UTC). Format: YYYY-MM-DD.
Start date must be after 2024-03-16. 7 day minimum time window for report is required. + end_date (str): Metric report end date (UTC). Format: YYYY-MM-DD.
A max of 1 year is allowed between the start and end date for reports. + granularity (str): TOTAL - metrics are aggregated over the specified date range.
WEEK - metrics are broken down weekly.
MONTH - metrics are broken down monthly. + level (str): Level of the report + columns ([ConversionProductReportingColumn]): Metric and entity columns + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + 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 # 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 `30` day.. [optional] if omitted the server will use the default value of 30 # 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 + conversion_product_breakdown (str): Report breakdown type. This is used to specify the breakdown of the report by brand, category, or SKU.. [optional] if omitted the server will use the default value of "PRODUCT_BRAND" # noqa: E501 + conversion_product_attribution_type (str): Required attribution type of the B/C/S report.
When the attribution type is BRAND_ATTRIBUTION, start_date for the report must be after 2025-04-01.. [optional] if omitted the server will use the default value of "DEFAULT" # noqa: E501 + campaign_objective_types ([ObjectiveType]): List of values for filtering. Default is ['CONSIDERATION','AWARENESS','WEB_CONVERSION','VIDEO_COMPLETION'].. [optional] # noqa: E501 + campaign_ids ([str]): List of campaign ids.
Only support campaign_ids field when level of the report is CAMPAIGN.. [optional] # noqa: E501 + ad_group_ids ([str]): List of ad group ids.
Only support ad_group_ids field when level of the report is AD_GROUP.. [optional] # noqa: E501 + product_sku_ids ([str]): List of SKU ids.
Only support product_sku_ids field when report breakdown type is PRODUCT_SKU_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.report_name = report_name + self.start_date = start_date + self.end_date = end_date + self.granularity = granularity + self.level = level + self.columns = columns + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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_name, start_date, end_date, granularity, level, columns, *args, **kwargs): # noqa: E501 + """ConversionProductReportRequest - a model defined in OpenAPI + + Args: + report_name (str): Name of the conversion product report. + start_date (str): Metric report start date (UTC). Format: YYYY-MM-DD.
Start date must be after 2024-03-16. 7 day minimum time window for report is required. + end_date (str): Metric report end date (UTC). Format: YYYY-MM-DD.
A max of 1 year is allowed between the start and end date for reports. + granularity (str): TOTAL - metrics are aggregated over the specified date range.
WEEK - metrics are broken down weekly.
MONTH - metrics are broken down monthly. + level (str): Level of the report + columns ([ConversionProductReportingColumn]): Metric and entity columns + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + 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 # 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 `30` day.. [optional] if omitted the server will use the default value of 30 # 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 + conversion_product_breakdown (str): Report breakdown type. This is used to specify the breakdown of the report by brand, category, or SKU.. [optional] if omitted the server will use the default value of "PRODUCT_BRAND" # noqa: E501 + conversion_product_attribution_type (str): Required attribution type of the B/C/S report.
When the attribution type is BRAND_ATTRIBUTION, start_date for the report must be after 2025-04-01.. [optional] if omitted the server will use the default value of "DEFAULT" # noqa: E501 + campaign_objective_types ([ObjectiveType]): List of values for filtering. Default is ['CONSIDERATION','AWARENESS','WEB_CONVERSION','VIDEO_COMPLETION'].. [optional] # noqa: E501 + campaign_ids ([str]): List of campaign ids.
Only support campaign_ids field when level of the report is CAMPAIGN.. [optional] # noqa: E501 + ad_group_ids ([str]): List of ad group ids.
Only support ad_group_ids field when level of the report is AD_GROUP.. [optional] # noqa: E501 + product_sku_ids ([str]): List of SKU ids.
Only support product_sku_ids field when report breakdown type is PRODUCT_SKU_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.report_name = report_name + self.start_date = start_date + self.end_date = end_date + self.granularity = granularity + self.level = level + self.columns = columns + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/conversion_product_reporting_column.py b/openapi_generated/pinterest_client/model/conversion_product_reporting_column.py new file mode 100644 index 0000000..06c30d8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/conversion_product_reporting_column.py @@ -0,0 +1,453 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ConversionProductReportingColumn(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',): { + 'CAMPAIGN_NAME': "CAMPAIGN_NAME", + 'CAMPAIGN_ID': "CAMPAIGN_ID", + 'ADVERTISER_ID': "ADVERTISER_ID", + 'AD_GROUP_ID': "AD_GROUP_ID", + 'CAMPAIGN_OBJECTIVE_TYPE': "CAMPAIGN_OBJECTIVE_TYPE", + 'AD_GROUP_NAME': "AD_GROUP_NAME", + 'CONVERSION_PRODUCT_ID': "CONVERSION_PRODUCT_ID", + 'CONVERSION_PRODUCT_BRAND': "CONVERSION_PRODUCT_BRAND", + 'CONVERSION_PRODUCT_CATEGORY': "CONVERSION_PRODUCT_CATEGORY", + 'CONVERSION_PRODUCT_ID_GROUP': "CONVERSION_PRODUCT_ID_GROUP", + '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_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_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_USD': "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_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_USD': "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY': "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE': "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", + 'TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY': "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE': "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", + 'TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY': "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE': "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", + 'TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE': "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE': "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE': "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", + 'TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY': "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", + 'TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE': "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", + 'TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD': "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", + }, + } + + 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): + """ConversionProductReportingColumn - 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): Conversion Product Reporting columns., must be one of ["CAMPAIGN_NAME", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "CAMPAIGN_OBJECTIVE_TYPE", "AD_GROUP_NAME", "CONVERSION_PRODUCT_ID", "CONVERSION_PRODUCT_BRAND", "CONVERSION_PRODUCT_CATEGORY", "CONVERSION_PRODUCT_ID_GROUP", "TOTAL_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE", "TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", ] # noqa: E501 + + Keyword Args: + value (str): Conversion Product Reporting columns., must be one of ["CAMPAIGN_NAME", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "CAMPAIGN_OBJECTIVE_TYPE", "AD_GROUP_NAME", "CONVERSION_PRODUCT_ID", "CONVERSION_PRODUCT_BRAND", "CONVERSION_PRODUCT_CATEGORY", "CONVERSION_PRODUCT_ID_GROUP", "TOTAL_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE", "TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", ] # 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): + """ConversionProductReportingColumn - 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): Conversion Product Reporting columns., must be one of ["CAMPAIGN_NAME", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "CAMPAIGN_OBJECTIVE_TYPE", "AD_GROUP_NAME", "CONVERSION_PRODUCT_ID", "CONVERSION_PRODUCT_BRAND", "CONVERSION_PRODUCT_CATEGORY", "CONVERSION_PRODUCT_ID_GROUP", "TOTAL_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE", "TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", ] # noqa: E501 + + Keyword Args: + value (str): Conversion Product Reporting columns., must be one of ["CAMPAIGN_NAME", "CAMPAIGN_ID", "ADVERTISER_ID", "AD_GROUP_ID", "CAMPAIGN_OBJECTIVE_TYPE", "AD_GROUP_NAME", "CONVERSION_PRODUCT_ID", "CONVERSION_PRODUCT_BRAND", "CONVERSION_PRODUCT_CATEGORY", "CONVERSION_PRODUCT_ID_GROUP", "TOTAL_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE", "TOTAL_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_CART_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_PAGE_VISIT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SIGNUP_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_WATCH_VIDEO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_LEAD_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SEARCH_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CATEGORY_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_CUSTOM_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_UNKNOWN_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_PAYMENT_INFO_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_ADD_TO_WISHLIST_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_INITIATE_CHECKOUT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_SUBSCRIBE_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_WEB_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_INAPP_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_QUANTITY", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE", "TOTAL_OFFLINE_VIEW_CONTENT_CONVERSION_PRODUCT_VALUE_IN_USD", ] # 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/custom_number0_filter.py b/openapi_generated/pinterest_client/model/custom_number0_filter.py new file mode 100644 index 0000000..94179e9 --- /dev/null +++ b/openapi_generated/pinterest_client/model/custom_number0_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_uint32_criteria import CatalogsProductGroupUint32Criteria + globals()['CatalogsProductGroupUint32Criteria'] = CatalogsProductGroupUint32Criteria + + +class CustomNumber0Filter(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 { + 'custom_number_0': (CatalogsProductGroupUint32Criteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'custom_number_0': 'CUSTOM_NUMBER_0', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, custom_number_0, *args, **kwargs): # noqa: E501 + """CustomNumber0Filter - a model defined in OpenAPI + + Args: + custom_number_0 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_0 = custom_number_0 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, custom_number_0, *args, **kwargs): # noqa: E501 + """CustomNumber0Filter - a model defined in OpenAPI + + Args: + custom_number_0 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_0 = custom_number_0 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/custom_number1_filter.py b/openapi_generated/pinterest_client/model/custom_number1_filter.py new file mode 100644 index 0000000..8d37e1e --- /dev/null +++ b/openapi_generated/pinterest_client/model/custom_number1_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_uint32_criteria import CatalogsProductGroupUint32Criteria + globals()['CatalogsProductGroupUint32Criteria'] = CatalogsProductGroupUint32Criteria + + +class CustomNumber1Filter(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 { + 'custom_number_1': (CatalogsProductGroupUint32Criteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'custom_number_1': 'CUSTOM_NUMBER_1', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, custom_number_1, *args, **kwargs): # noqa: E501 + """CustomNumber1Filter - a model defined in OpenAPI + + Args: + custom_number_1 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_1 = custom_number_1 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, custom_number_1, *args, **kwargs): # noqa: E501 + """CustomNumber1Filter - a model defined in OpenAPI + + Args: + custom_number_1 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_1 = custom_number_1 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/custom_number2_filter.py b/openapi_generated/pinterest_client/model/custom_number2_filter.py new file mode 100644 index 0000000..e8d601b --- /dev/null +++ b/openapi_generated/pinterest_client/model/custom_number2_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_uint32_criteria import CatalogsProductGroupUint32Criteria + globals()['CatalogsProductGroupUint32Criteria'] = CatalogsProductGroupUint32Criteria + + +class CustomNumber2Filter(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 { + 'custom_number_2': (CatalogsProductGroupUint32Criteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'custom_number_2': 'CUSTOM_NUMBER_2', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, custom_number_2, *args, **kwargs): # noqa: E501 + """CustomNumber2Filter - a model defined in OpenAPI + + Args: + custom_number_2 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_2 = custom_number_2 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, custom_number_2, *args, **kwargs): # noqa: E501 + """CustomNumber2Filter - a model defined in OpenAPI + + Args: + custom_number_2 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_2 = custom_number_2 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/custom_number3_filter.py b/openapi_generated/pinterest_client/model/custom_number3_filter.py new file mode 100644 index 0000000..3575599 --- /dev/null +++ b/openapi_generated/pinterest_client/model/custom_number3_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_uint32_criteria import CatalogsProductGroupUint32Criteria + globals()['CatalogsProductGroupUint32Criteria'] = CatalogsProductGroupUint32Criteria + + +class CustomNumber3Filter(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 { + 'custom_number_3': (CatalogsProductGroupUint32Criteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'custom_number_3': 'CUSTOM_NUMBER_3', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, custom_number_3, *args, **kwargs): # noqa: E501 + """CustomNumber3Filter - a model defined in OpenAPI + + Args: + custom_number_3 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_3 = custom_number_3 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, custom_number_3, *args, **kwargs): # noqa: E501 + """CustomNumber3Filter - a model defined in OpenAPI + + Args: + custom_number_3 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_3 = custom_number_3 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/custom_number4_filter.py b/openapi_generated/pinterest_client/model/custom_number4_filter.py new file mode 100644 index 0000000..31f1c62 --- /dev/null +++ b/openapi_generated/pinterest_client/model/custom_number4_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_uint32_criteria import CatalogsProductGroupUint32Criteria + globals()['CatalogsProductGroupUint32Criteria'] = CatalogsProductGroupUint32Criteria + + +class CustomNumber4Filter(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 { + 'custom_number_4': (CatalogsProductGroupUint32Criteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'custom_number_4': 'CUSTOM_NUMBER_4', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, custom_number_4, *args, **kwargs): # noqa: E501 + """CustomNumber4Filter - a model defined in OpenAPI + + Args: + custom_number_4 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_4 = custom_number_4 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, custom_number_4, *args, **kwargs): # noqa: E501 + """CustomNumber4Filter - a model defined in OpenAPI + + Args: + custom_number_4 (CatalogsProductGroupUint32Criteria): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.custom_number_4 = custom_number_4 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/error_response.py b/openapi_generated/pinterest_client/model/error_response.py new file mode 100644 index 0000000..393fb7f --- /dev/null +++ b/openapi_generated/pinterest_client/model/error_response.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ErrorResponse(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, code, message, *args, **kwargs): # noqa: E501 + """ErrorResponse - 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 + """ErrorResponse - 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/get_business_assets_response_catalog_info.py b/openapi_generated/pinterest_client/model/get_business_assets_response_catalog_info.py new file mode 100644 index 0000000..ef3fce8 --- /dev/null +++ b/openapi_generated/pinterest_client/model/get_business_assets_response_catalog_info.py @@ -0,0 +1,269 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 GetBusinessAssetsResponseCatalogInfo(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 = 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': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'catalog_type': (str,), # 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, *args, **kwargs): # noqa: E501 + """GetBusinessAssetsResponseCatalogInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Catalog ID.. [optional] # noqa: E501 + name (str): Catalog name. [optional] # noqa: E501 + catalog_type (str): Catalog 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 + """GetBusinessAssetsResponseCatalogInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Catalog ID.. [optional] # noqa: E501 + name (str): Catalog name. [optional] # noqa: E501 + catalog_type (str): Catalog 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/image_base64.py b/openapi_generated/pinterest_client/model/image_base64.py new file mode 100644 index 0000000..62c30cd --- /dev/null +++ b/openapi_generated/pinterest_client/model/image_base64.py @@ -0,0 +1,277 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ImageBase64(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 = { + ('content_type',): { + 'JPEG': "image/jpeg", + 'PNG': "image/png", + }, + } + + validations = { + ('data',): { + 'regex': { + 'pattern': r'[a-zA-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 { + 'content_type': (str,), # noqa: E501 + 'data': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'content_type': 'content_type', # noqa: E501 + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, content_type, data, *args, **kwargs): # noqa: E501 + """ImageBase64 - a model defined in OpenAPI + + Args: + content_type (str): + data (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.content_type = content_type + self.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, content_type, data, *args, **kwargs): # noqa: E501 + """ImageBase64 - a model defined in OpenAPI + + Args: + content_type (str): + data (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.content_type = content_type + self.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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_object2.py b/openapi_generated/pinterest_client/model/inline_object2.py new file mode 100644 index 0000000..b8c4674 --- /dev/null +++ b/openapi_generated/pinterest_client/model/inline_object2.py @@ -0,0 +1,294 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.image_base64 import ImageBase64 + globals()['Country'] = Country + globals()['ImageBase64'] = ImageBase64 + + +class InlineObject2(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 + 'username': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'about': (str,), # noqa: E501 + 'website': (str,), # noqa: E501 + 'profile_image': (ImageBase64,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'username': 'username', # noqa: E501 + 'country': 'country', # noqa: E501 + 'about': 'about', # noqa: E501 + 'website': 'website', # noqa: E501 + 'profile_image': 'profile_image', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, username, country, *args, **kwargs): # noqa: E501 + """InlineObject2 - a model defined in OpenAPI + + Args: + name (str): Brand Account name + username (str): Brand Account username + 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,) + about (str): Brand Account about information. [optional] # noqa: E501 + website (str): Brand Account website. [optional] # noqa: E501 + profile_image (ImageBase64): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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.username = username + 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, name, username, country, *args, **kwargs): # noqa: E501 + """InlineObject2 - a model defined in OpenAPI + + Args: + name (str): Brand Account name + username (str): Brand Account username + 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,) + about (str): Brand Account about information. [optional] # noqa: E501 + website (str): Brand Account website. [optional] # noqa: E501 + profile_image (ImageBase64): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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.username = username + 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/inline_object3.py b/openapi_generated/pinterest_client/model/inline_object3.py new file mode 100644 index 0000000..714a914 --- /dev/null +++ b/openapi_generated/pinterest_client/model/inline_object3.py @@ -0,0 +1,284 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.image_base64 import ImageBase64 + globals()['Country'] = Country + globals()['ImageBase64'] = ImageBase64 + + +class InlineObject3(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 + 'username': (str,), # noqa: E501 + 'country': (Country,), # noqa: E501 + 'about': (str,), # noqa: E501 + 'website': (str,), # noqa: E501 + 'profile_image': (ImageBase64,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'username': 'username', # noqa: E501 + 'country': 'country', # noqa: E501 + 'about': 'about', # noqa: E501 + 'website': 'website', # noqa: E501 + 'profile_image': 'profile_image', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InlineObject3 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Brand Account name. [optional] # noqa: E501 + username (str): Brand Account username. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + about (str): Brand Account about information. [optional] # noqa: E501 + website (str): Brand Account website. [optional] # noqa: E501 + profile_image (ImageBase64): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """InlineObject3 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Brand Account name. [optional] # noqa: E501 + username (str): Brand Account username. [optional] # noqa: E501 + country (Country): [optional] # noqa: E501 + about (str): Brand Account about information. [optional] # noqa: E501 + website (str): Brand Account website. [optional] # noqa: E501 + profile_image (ImageBase64): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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_object4.py b/openapi_generated/pinterest_client/model/inline_object4.py new file mode 100644 index 0000000..db44754 --- /dev/null +++ b/openapi_generated/pinterest_client/model/inline_object4.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 InlineObject4(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 + """InlineObject4 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 + """InlineObject4 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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/inline_response200.py b/openapi_generated/pinterest_client/model/inline_response200.py new file mode 100644 index 0000000..380bc1f --- /dev/null +++ b/openapi_generated/pinterest_client/model/inline_response200.py @@ -0,0 +1,272 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_subscription import LeadSubscription + globals()['LeadSubscription'] = LeadSubscription + + +class InlineResponse200(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': ([LeadSubscription],), # noqa: E501 + 'bookmark': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + 'bookmark': 'bookmark', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, items, *args, **kwargs): # noqa: E501 + """InlineResponse200 - a model defined in OpenAPI + + Args: + items ([LeadSubscription]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + bookmark (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.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, items, *args, **kwargs): # noqa: E501 + """InlineResponse200 - a model defined in OpenAPI + + Args: + items ([LeadSubscription]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + bookmark (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.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/inline_response2001.py b/openapi_generated/pinterest_client/model/inline_response2001.py new file mode 100644 index 0000000..0ce187d --- /dev/null +++ b/openapi_generated/pinterest_client/model/inline_response2001.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 InlineResponse2001(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 { + 'brand_account_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'brand_account_id': 'brand_account_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InlineResponse2001 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brand_account_id (str): id of the newly created brand 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 + """InlineResponse2001 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brand_account_id (str): id of the newly created brand 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/item_attributes_request_all_of1.py b/openapi_generated/pinterest_client/model/item_attributes_request_all_of1.py new file mode 100644 index 0000000..c1a0eab --- /dev/null +++ b/openapi_generated/pinterest_client/model/item_attributes_request_all_of1.py @@ -0,0 +1,412 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ItemAttributesRequestAllOf1(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 { + 'ad_image_0_link': (str, none_type,), # noqa: E501 + 'ad_image_1_link': (str, none_type,), # noqa: E501 + 'ad_image_2_link': (str, none_type,), # noqa: E501 + 'ad_image_3_link': (str, none_type,), # noqa: E501 + 'ad_image_4_link': (str, none_type,), # noqa: E501 + 'ad_image_5_link': (str, none_type,), # noqa: E501 + 'ad_image_6_link': (str, none_type,), # noqa: E501 + 'ad_image_7_link': (str, none_type,), # noqa: E501 + 'ad_image_8_link': (str, none_type,), # noqa: E501 + 'ad_image_9_link': (str, none_type,), # noqa: E501 + 'ad_image_10_link': (str, none_type,), # noqa: E501 + 'ad_image_11_link': (str, none_type,), # noqa: E501 + 'ad_image_12_link': (str, none_type,), # noqa: E501 + 'ad_image_13_link': (str, none_type,), # noqa: E501 + 'ad_image_14_link': (str, none_type,), # noqa: E501 + 'ad_image_15_link': (str, none_type,), # noqa: E501 + 'ad_image_16_link': (str, none_type,), # noqa: E501 + 'ad_image_17_link': (str, none_type,), # noqa: E501 + 'ad_image_18_link': (str, none_type,), # noqa: E501 + 'ad_image_19_link': (str, none_type,), # noqa: E501 + 'ad_image_0_tag': (str, none_type,), # noqa: E501 + 'ad_image_1_tag': (str, none_type,), # noqa: E501 + 'ad_image_2_tag': (str, none_type,), # noqa: E501 + 'ad_image_3_tag': (str, none_type,), # noqa: E501 + 'ad_image_4_tag': (str, none_type,), # noqa: E501 + 'ad_image_5_tag': (str, none_type,), # noqa: E501 + 'ad_image_6_tag': (str, none_type,), # noqa: E501 + 'ad_image_7_tag': (str, none_type,), # noqa: E501 + 'ad_image_8_tag': (str, none_type,), # noqa: E501 + 'ad_image_9_tag': (str, none_type,), # noqa: E501 + 'ad_image_10_tag': (str, none_type,), # noqa: E501 + 'ad_image_11_tag': (str, none_type,), # noqa: E501 + 'ad_image_12_tag': (str, none_type,), # noqa: E501 + 'ad_image_13_tag': (str, none_type,), # noqa: E501 + 'ad_image_14_tag': (str, none_type,), # noqa: E501 + 'ad_image_15_tag': (str, none_type,), # noqa: E501 + 'ad_image_16_tag': (str, none_type,), # noqa: E501 + 'ad_image_17_tag': (str, none_type,), # noqa: E501 + 'ad_image_18_tag': (str, none_type,), # noqa: E501 + 'ad_image_19_tag': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ad_image_0_link': 'ad_image_0_link', # noqa: E501 + 'ad_image_1_link': 'ad_image_1_link', # noqa: E501 + 'ad_image_2_link': 'ad_image_2_link', # noqa: E501 + 'ad_image_3_link': 'ad_image_3_link', # noqa: E501 + 'ad_image_4_link': 'ad_image_4_link', # noqa: E501 + 'ad_image_5_link': 'ad_image_5_link', # noqa: E501 + 'ad_image_6_link': 'ad_image_6_link', # noqa: E501 + 'ad_image_7_link': 'ad_image_7_link', # noqa: E501 + 'ad_image_8_link': 'ad_image_8_link', # noqa: E501 + 'ad_image_9_link': 'ad_image_9_link', # noqa: E501 + 'ad_image_10_link': 'ad_image_10_link', # noqa: E501 + 'ad_image_11_link': 'ad_image_11_link', # noqa: E501 + 'ad_image_12_link': 'ad_image_12_link', # noqa: E501 + 'ad_image_13_link': 'ad_image_13_link', # noqa: E501 + 'ad_image_14_link': 'ad_image_14_link', # noqa: E501 + 'ad_image_15_link': 'ad_image_15_link', # noqa: E501 + 'ad_image_16_link': 'ad_image_16_link', # noqa: E501 + 'ad_image_17_link': 'ad_image_17_link', # noqa: E501 + 'ad_image_18_link': 'ad_image_18_link', # noqa: E501 + 'ad_image_19_link': 'ad_image_19_link', # noqa: E501 + 'ad_image_0_tag': 'ad_image_0_tag', # noqa: E501 + 'ad_image_1_tag': 'ad_image_1_tag', # noqa: E501 + 'ad_image_2_tag': 'ad_image_2_tag', # noqa: E501 + 'ad_image_3_tag': 'ad_image_3_tag', # noqa: E501 + 'ad_image_4_tag': 'ad_image_4_tag', # noqa: E501 + 'ad_image_5_tag': 'ad_image_5_tag', # noqa: E501 + 'ad_image_6_tag': 'ad_image_6_tag', # noqa: E501 + 'ad_image_7_tag': 'ad_image_7_tag', # noqa: E501 + 'ad_image_8_tag': 'ad_image_8_tag', # noqa: E501 + 'ad_image_9_tag': 'ad_image_9_tag', # noqa: E501 + 'ad_image_10_tag': 'ad_image_10_tag', # noqa: E501 + 'ad_image_11_tag': 'ad_image_11_tag', # noqa: E501 + 'ad_image_12_tag': 'ad_image_12_tag', # noqa: E501 + 'ad_image_13_tag': 'ad_image_13_tag', # noqa: E501 + 'ad_image_14_tag': 'ad_image_14_tag', # noqa: E501 + 'ad_image_15_tag': 'ad_image_15_tag', # noqa: E501 + 'ad_image_16_tag': 'ad_image_16_tag', # noqa: E501 + 'ad_image_17_tag': 'ad_image_17_tag', # noqa: E501 + 'ad_image_18_tag': 'ad_image_18_tag', # noqa: E501 + 'ad_image_19_tag': 'ad_image_19_tag', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ItemAttributesRequestAllOf1 - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_image_0_link (str, none_type): Restricted

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 2000 characters

Ad image link that supplements main image for shopping campaigns.

Image format:

Link guidelines:

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

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

<= 511 characters

If you provide an ad_image_x_link, include the image tag with the corresponding ad_image_x_tag attribute.

. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/label.py b/openapi_generated/pinterest_client/model/label.py new file mode 100644 index 0000000..50ea224 --- /dev/null +++ b/openapi_generated/pinterest_client/model/label.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 Label(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 { + 'id': (str,), # noqa: E501 + 'value': (str,), # noqa: E501 + 'label_type': (str,), # noqa: E501 + 'parent_id': (str,), # noqa: E501 + 'parent_type': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'value': 'value', # noqa: E501 + 'label_type': 'label_type', # noqa: E501 + 'parent_id': 'parent_id', # noqa: E501 + 'parent_type': 'parent_type', # 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 + """Label - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Label ID.. [optional] # noqa: E501 + value (str): Label name.. [optional] # noqa: E501 + label_type (str): Label type.. [optional] # noqa: E501 + parent_id (str): Label parent entity ID.. [optional] # noqa: E501 + parent_type (str): Label parent entity type.. [optional] # noqa: E501 + status (str): Label status.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """Label - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Label ID.. [optional] # noqa: E501 + value (str): Label name.. [optional] # noqa: E501 + label_type (str): Label type.. [optional] # noqa: E501 + parent_id (str): Label parent entity ID.. [optional] # noqa: E501 + parent_type (str): Label parent entity type.. [optional] # noqa: E501 + status (str): Label status.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/label_create_request.py b/openapi_generated/pinterest_client/model/label_create_request.py new file mode 100644 index 0000000..2da12da --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_create_request.py @@ -0,0 +1,279 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.label_create_request_labels import LabelCreateRequestLabels + globals()['LabelCreateRequestLabels'] = LabelCreateRequestLabels + + +class LabelCreateRequest(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 = { + ('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 + """ + 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 { + 'labels': ([LabelCreateRequestLabels],), # noqa: E501 + 'parent_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'labels': 'labels', # noqa: E501 + 'parent_id': 'parent_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, labels, parent_id, *args, **kwargs): # noqa: E501 + """LabelCreateRequest - a model defined in OpenAPI + + Args: + labels ([LabelCreateRequestLabels]): Labels that you are applying to the campaign. + parent_id (str): Unique identifier of the asset you are labelling. Currently, you can only label campaigns. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.labels = labels + self.parent_id = parent_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, labels, parent_id, *args, **kwargs): # noqa: E501 + """LabelCreateRequest - a model defined in OpenAPI + + Args: + labels ([LabelCreateRequestLabels]): Labels that you are applying to the campaign. + parent_id (str): Unique identifier of the asset you are labelling. Currently, you can only label campaigns. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.labels = labels + self.parent_id = parent_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/label_create_request_labels.py b/openapi_generated/pinterest_client/model/label_create_request_labels.py new file mode 100644 index 0000000..7e92c9b --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_create_request_labels.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.label_type import LabelType + globals()['LabelType'] = LabelType + + +class LabelCreateRequestLabels(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 { + 'value': (str,), # noqa: E501 + 'label_type': (LabelType,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'value': 'value', # noqa: E501 + 'label_type': 'label_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, value, label_type, *args, **kwargs): # noqa: E501 + """LabelCreateRequestLabels - a model defined in OpenAPI + + Args: + value (str): Label name. 100-character limit. + label_type (LabelType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.value = value + self.label_type = label_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, value, label_type, *args, **kwargs): # noqa: E501 + """LabelCreateRequestLabels - a model defined in OpenAPI + + Args: + value (str): Label name. 100-character limit. + label_type (LabelType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.value = value + self.label_type = label_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/label_error.py b/openapi_generated/pinterest_client/model/label_error.py new file mode 100644 index 0000000..b90d7a6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_error.py @@ -0,0 +1,266 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.label import Label + globals()['Label'] = Label + + +class LabelError(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': (Label,), # noqa: E501 + 'error_messages': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'error_messages': 'error_messages', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LabelError - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (Label): [optional] # noqa: E501 + error_messages ([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 + """LabelError - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (Label): [optional] # noqa: E501 + error_messages ([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/label_parent_type.py b/openapi_generated/pinterest_client/model/label_parent_type.py new file mode 100644 index 0000000..80f2816 --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_parent_type.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 LabelParentType(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',): { + 'CAMPAIGN': "CAMPAIGN", + }, + } + + 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): + """LabelParentType - 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): Label parent entity type.. if omitted defaults to "CAMPAIGN", must be one of ["CAMPAIGN", ] # noqa: E501 + + Keyword Args: + value (str): Label parent entity type.. if omitted defaults to "CAMPAIGN", must be one of ["CAMPAIGN", ] # 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 = "CAMPAIGN" + + _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): + """LabelParentType - 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): Label parent entity type.. if omitted defaults to "CAMPAIGN", must be one of ["CAMPAIGN", ] # noqa: E501 + + Keyword Args: + value (str): Label parent entity type.. if omitted defaults to "CAMPAIGN", must be one of ["CAMPAIGN", ] # 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 = "CAMPAIGN" + + _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/label_status.py b/openapi_generated/pinterest_client/model/label_status.py new file mode 100644 index 0000000..118d5f6 --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_status.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 LabelStatus(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',): { + 'ACTIVE': "ACTIVE", + 'ARCHIVED': "ARCHIVED", + }, + } + + 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): + """LabelStatus - 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 new status you want to give the label, either `ACTIVE` (in use) or no longer in use (`ARCHIVED`).., must be one of ["ACTIVE", "ARCHIVED", ] # noqa: E501 + + Keyword Args: + value (str): The new status you want to give the label, either `ACTIVE` (in use) or no longer in use (`ARCHIVED`).., must be one of ["ACTIVE", "ARCHIVED", ] # 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): + """LabelStatus - 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 new status you want to give the label, either `ACTIVE` (in use) or no longer in use (`ARCHIVED`).., must be one of ["ACTIVE", "ARCHIVED", ] # noqa: E501 + + Keyword Args: + value (str): The new status you want to give the label, either `ACTIVE` (in use) or no longer in use (`ARCHIVED`).., must be one of ["ACTIVE", "ARCHIVED", ] # 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/label_type.py b/openapi_generated/pinterest_client/model/label_type.py new file mode 100644 index 0000000..a3ea916 --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_type.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 LabelType(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", + }, + } + + 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): + """LabelType - 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): Category for the labeled items. Currently, `BRAND` is the only option. You can apply one brand label to a campaign.. if omitted defaults to "BRAND", must be one of ["BRAND", ] # noqa: E501 + + Keyword Args: + value (str): Category for the labeled items. Currently, `BRAND` is the only option. You can apply one brand label to a campaign.. if omitted defaults to "BRAND", must be one of ["BRAND", ] # 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 = "BRAND" + + _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): + """LabelType - 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): Category for the labeled items. Currently, `BRAND` is the only option. You can apply one brand label to a campaign.. if omitted defaults to "BRAND", must be one of ["BRAND", ] # noqa: E501 + + Keyword Args: + value (str): Category for the labeled items. Currently, `BRAND` is the only option. You can apply one brand label to a campaign.. if omitted defaults to "BRAND", must be one of ["BRAND", ] # 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 = "BRAND" + + _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/label_update_request.py b/openapi_generated/pinterest_client/model/label_update_request.py new file mode 100644 index 0000000..2e9869e --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_update_request.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.label_update_request_labels import LabelUpdateRequestLabels + globals()['LabelUpdateRequestLabels'] = LabelUpdateRequestLabels + + +class LabelUpdateRequest(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 { + 'labels': ([LabelUpdateRequestLabels],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'labels': 'labels', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, labels, *args, **kwargs): # noqa: E501 + """LabelUpdateRequest - a model defined in OpenAPI + + Args: + labels ([LabelUpdateRequestLabels]): Labels that you are applying to the campaign. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.labels = labels + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, labels, *args, **kwargs): # noqa: E501 + """LabelUpdateRequest - a model defined in OpenAPI + + Args: + labels ([LabelUpdateRequestLabels]): Labels that you are applying to the campaign. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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.labels = labels + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/label_update_request_labels.py b/openapi_generated/pinterest_client/model/label_update_request_labels.py new file mode 100644 index 0000000..af523dc --- /dev/null +++ b/openapi_generated/pinterest_client/model/label_update_request_labels.py @@ -0,0 +1,276 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.label_status import LabelStatus + globals()['LabelStatus'] = LabelStatus + + +class LabelUpdateRequestLabels(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 + 'value': (str,), # noqa: E501 + 'status': (LabelStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'value': 'value', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """LabelUpdateRequestLabels - a model defined in OpenAPI + + Args: + id (str): Label ID. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str): Label name. 100-character limit.. [optional] # noqa: E501 + status (LabelStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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 + """LabelUpdateRequestLabels - a model defined in OpenAPI + + Args: + id (str): Label ID. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + value (str): Label name. 100-character limit.. [optional] # noqa: E501 + status (LabelStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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/labels_response.py b/openapi_generated/pinterest_client/model/labels_response.py new file mode 100644 index 0000000..476c757 --- /dev/null +++ b/openapi_generated/pinterest_client/model/labels_response.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.label import Label + from openapi_generated.pinterest_client.model.label_error import LabelError + globals()['Label'] = Label + globals()['LabelError'] = LabelError + + +class LabelsResponse(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': ([LabelError],), # noqa: E501 + 'labels': ([Label],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'errors': 'errors', # noqa: E501 + 'labels': 'labels', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LabelsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 ([LabelError]): Labels that were not successfully applied.. [optional] # noqa: E501 + labels ([Label]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """LabelsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 ([LabelError]): Labels that were not successfully applied.. [optional] # noqa: E501 + labels ([Label]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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_subscription.py b/openapi_generated/pinterest_client/model/lead_subscription.py new file mode 100644 index 0000000..b9fd5e4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_subscription.py @@ -0,0 +1,308 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 LeadSubscription(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 + }, + }, + ('lead_form_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('ad_account_id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('user_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 + 'lead_form_id': (str, none_type,), # noqa: E501 + 'webhook_url': (str,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'user_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 + 'lead_form_id': 'lead_form_id', # noqa: E501 + 'webhook_url': 'webhook_url', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'user_account_id': 'user_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 + """LeadSubscription - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 + lead_form_id (str, none_type): Lead form ID.. [optional] # noqa: E501 + webhook_url (str): Standard HTTPS webhook URL.. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 + user_account_id (str): User account used to subscribe lead data.. [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): 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 + """LeadSubscription - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 + lead_form_id (str, none_type): Lead form ID.. [optional] # noqa: E501 + webhook_url (str): Standard HTTPS webhook URL.. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this lead form belongs to.. [optional] # noqa: E501 + user_account_id (str): User account used to subscribe lead data.. [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): 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/lead_subscription_post_params_create.py b/openapi_generated/pinterest_client/model/lead_subscription_post_params_create.py new file mode 100644 index 0000000..5cd43b7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_subscription_post_params_create.py @@ -0,0 +1,333 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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_subscription_post_params_create_all_of import LeadSubscriptionPostParamsCreateAllOf + globals()['LeadSubscriptionPostParamsCreateAllOf'] = LeadSubscriptionPostParamsCreateAllOf + + +class LeadSubscriptionPostParamsCreate(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 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + 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 + 'partner_access_token': (str,), # noqa: E501 + 'partner_refresh_token': (str,), # noqa: E501 + 'partner_metadata': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'lead_form_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'webhook_url': 'webhook_url', # noqa: E501 + 'partner_access_token': 'partner_access_token', # noqa: E501 + 'partner_refresh_token': 'partner_refresh_token', # noqa: E501 + 'partner_metadata': 'partner_metadata', # noqa: E501 + 'lead_form_id': 'lead_form_id', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LeadSubscriptionPostParamsCreate - a model defined in OpenAPI + + Keyword Args: + webhook_url (str): Standard HTTPS webhook URL. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_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 (bool, date, datetime, dict, float, int, list, str, none_type): Partner metadata. Only for clients that requires special handling. We recommend to avoid this param.. [optional] # noqa: E501 + lead_form_id (str): Lead form 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__,) + + 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 + """LeadSubscriptionPostParamsCreate - a model defined in OpenAPI + + Keyword Args: + webhook_url (str): Standard HTTPS webhook URL. + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_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 (bool, date, datetime, dict, float, int, list, str, none_type): Partner metadata. Only for clients that requires special handling. We recommend to avoid this param.. [optional] # noqa: E501 + lead_form_id (str): Lead form 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__,) + + 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_subscription_post_params_create_all_of.py b/openapi_generated/pinterest_client/model/lead_subscription_post_params_create_all_of.py new file mode 100644 index 0000000..db65a95 --- /dev/null +++ b/openapi_generated/pinterest_client/model/lead_subscription_post_params_create_all_of.py @@ -0,0 +1,271 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 LeadSubscriptionPostParamsCreateAllOf(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 { + 'webhook_url': (str,), # noqa: E501 + 'lead_form_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'webhook_url': 'webhook_url', # noqa: E501 + 'lead_form_id': 'lead_form_id', # 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 + """LeadSubscriptionPostParamsCreateAllOf - 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 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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 + """LeadSubscriptionPostParamsCreateAllOf - 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 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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/notification.py b/openapi_generated/pinterest_client/model/notification.py new file mode 100644 index 0000000..b1c8d7a --- /dev/null +++ b/openapi_generated/pinterest_client/model/notification.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 Notification(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, + 'max_properties': 100, + }, + } + + @cached_property + def additional_properties_type(): + """ + 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 { + } + + @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 + """Notification - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 + """Notification - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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/notification_response.py b/openapi_generated/pinterest_client/model/notification_response.py new file mode 100644 index 0000000..55867f2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/notification_response.py @@ -0,0 +1,264 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 NotificationResponse(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 + 'received_at': (int,), # noqa: E501 + 'error_msg': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'success': 'success', # noqa: E501 + 'received_at': 'received_at', # noqa: E501 + 'error_msg': 'error_msg', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """NotificationResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 notification accepted.. [optional] # noqa: E501 + received_at (int): Received time. Unix timestamp in seconds.. [optional] # noqa: E501 + error_msg (str): error message when success is false. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """NotificationResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 notification accepted.. [optional] # noqa: E501 + received_at (int): Received time. Unix timestamp in seconds.. [optional] # noqa: E501 + error_msg (str): error message when success is false. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/notifications.py b/openapi_generated/pinterest_client/model/notifications.py new file mode 100644 index 0000000..5784fb7 --- /dev/null +++ b/openapi_generated/pinterest_client/model/notifications.py @@ -0,0 +1,288 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.notification import Notification + globals()['Notification'] = Notification + + +class Notifications(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': 100, + '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 { + 'value': ([Notification],), + } + + @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): + """Notifications - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([Notification]): Array of 1-100 notification objects. # noqa: E501 + + Keyword Args: + value ([Notification]): Array of 1-100 notification objects. # 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): + """Notifications - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([Notification]): Array of 1-100 notification objects. # noqa: E501 + + Keyword Args: + value ([Notification]): Array of 1-100 notification objects. # 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/oauth_access_token_response_integration_refresh_all_of.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh_all_of.py new file mode 100644 index 0000000..a9b9270 --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_integration_refresh_all_of.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 OauthAccessTokenResponseIntegrationRefreshAllOf(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 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'refresh_token': 'refresh_token', # noqa: E501 + 'refresh_token_expires_in': 'refresh_token_expires_in', # 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, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseIntegrationRefreshAllOf - a model defined in OpenAPI + + Args: + refresh_token (str): + refresh_token_expires_in (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 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, *args, **kwargs): # noqa: E501 + """OauthAccessTokenResponseIntegrationRefreshAllOf - a model defined in OpenAPI + + Args: + refresh_token (str): + refresh_token_expires_in (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 + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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_refresh_all_of1.py b/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh_all_of1.py new file mode 100644 index 0000000..2a389c4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/oauth_access_token_response_refresh_all_of1.py @@ -0,0 +1,274 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 OauthAccessTokenResponseRefreshAllOf1(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 + """OauthAccessTokenResponseRefreshAllOf1 - 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 + """OauthAccessTokenResponseRefreshAllOf1 - 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/pin_media_base.py b/openapi_generated/pinterest_client/model/pin_media_base.py new file mode 100644 index 0000000..be84976 --- /dev/null +++ b/openapi_generated/pinterest_client/model/pin_media_base.py @@ -0,0 +1,256 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 PinMediaBase(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 { + 'media_type': (str,), # 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, *args, **kwargs): # noqa: E501 + """PinMediaBase - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_type (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 + """PinMediaBase - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_type (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/pinterest_lib_error.py b/openapi_generated/pinterest_client/model/pinterest_lib_error.py new file mode 100644 index 0000000..7c2ad36 --- /dev/null +++ b/openapi_generated/pinterest_client/model/pinterest_lib_error.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 PinterestLibError(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, code, message, *args, **kwargs): # noqa: E501 + """PinterestLibError - 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 + """PinterestLibError - 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/product_tag.py b/openapi_generated/pinterest_client/model/product_tag.py new file mode 100644 index 0000000..3996592 --- /dev/null +++ b/openapi_generated/pinterest_client/model/product_tag.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ProductTag(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 = { + ('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 + """ + 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_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pin_id': 'pin_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ProductTag - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (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 + """ProductTag - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (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/promotion_array_element.py b/openapi_generated/pinterest_client/model/promotion_array_element.py new file mode 100644 index 0000000..017314f --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_array_element.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.promotion_response import PromotionResponse + globals()['Exception'] = Exception + globals()['PromotionResponse'] = PromotionResponse + + +class PromotionArrayElement(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': (PromotionResponse,), # noqa: E501 + 'exception': (Exception,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'exception': 'exception', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionArrayElement - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (PromotionResponse): [optional] # noqa: E501 + exception (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 + """PromotionArrayElement - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (PromotionResponse): [optional] # noqa: E501 + exception (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/promotion_common.py b/openapi_generated/pinterest_client/model/promotion_common.py new file mode 100644 index 0000000..f5a7bee --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_common.py @@ -0,0 +1,310 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.promotion_template_value import PromotionTemplateValue + from openapi_generated.pinterest_client.model.promotion_type import PromotionType + globals()['PromotionTemplateValue'] = PromotionTemplateValue + globals()['PromotionType'] = PromotionType + + +class PromotionCommon(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_status',): { + 'OTHER': "OTHER", + 'ACTIVE': "ACTIVE", + 'PAUSED': "PAUSED", + 'SCHEDULED': "SCHEDULED", + 'EXPIRED': "EXPIRED", + }, + } + + validations = { + ('external_id',): { + 'max_length': 64, + }, + ('template_values',): { + 'max_items': 2, + '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 { + 'external_id': (str,), # noqa: E501 + 'platform_type': (str,), # noqa: E501 + 'promotion_title': (str,), # noqa: E501 + 'promotion_code': (str,), # noqa: E501 + 'start_time': (int,), # noqa: E501 + 'end_time': (int,), # noqa: E501 + 'promotion_type': (PromotionType,), # noqa: E501 + 'template_values': ([PromotionTemplateValue],), # noqa: E501 + 'discount_status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'external_id': 'external_id', # noqa: E501 + 'platform_type': 'platform_type', # noqa: E501 + 'promotion_title': 'promotion_title', # noqa: E501 + 'promotion_code': 'promotion_code', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + 'promotion_type': 'promotion_type', # noqa: E501 + 'template_values': 'template_values', # noqa: E501 + 'discount_status': 'discount_status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_title (str): Internal name for the promotion.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + promotion_type (PromotionType): [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionCommon - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_title (str): Internal name for the promotion.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + promotion_type (PromotionType): [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/promotion_create_request.py b/openapi_generated/pinterest_client/model/promotion_create_request.py new file mode 100644 index 0000000..3a5cea5 --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_create_request.py @@ -0,0 +1,362 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.promotion_common import PromotionCommon + from openapi_generated.pinterest_client.model.promotion_template_value import PromotionTemplateValue + from openapi_generated.pinterest_client.model.promotion_type import PromotionType + globals()['PromotionCommon'] = PromotionCommon + globals()['PromotionTemplateValue'] = PromotionTemplateValue + globals()['PromotionType'] = PromotionType + + +class PromotionCreateRequest(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 = { + ('discount_status',): { + 'OTHER': "OTHER", + 'ACTIVE': "ACTIVE", + 'PAUSED': "PAUSED", + 'SCHEDULED': "SCHEDULED", + 'EXPIRED': "EXPIRED", + }, + } + + validations = { + ('external_id',): { + 'max_length': 64, + }, + ('template_values',): { + 'max_items': 2, + '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 { + 'promotion_title': (str,), # noqa: E501 + 'promotion_type': (PromotionType,), # noqa: E501 + 'external_id': (str,), # noqa: E501 + 'platform_type': (str,), # noqa: E501 + 'promotion_code': (str,), # noqa: E501 + 'start_time': (int,), # noqa: E501 + 'end_time': (int,), # noqa: E501 + 'template_values': ([PromotionTemplateValue],), # noqa: E501 + 'discount_status': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'promotion_title': 'promotion_title', # noqa: E501 + 'promotion_type': 'promotion_type', # noqa: E501 + 'external_id': 'external_id', # noqa: E501 + 'platform_type': 'platform_type', # noqa: E501 + 'promotion_code': 'promotion_code', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + 'template_values': 'template_values', # noqa: E501 + 'discount_status': 'discount_status', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionCreateRequest - a model defined in OpenAPI + + Keyword Args: + promotion_title (str): Internal name for the promotion. + promotion_type (PromotionType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionCreateRequest - a model defined in OpenAPI + + Keyword Args: + promotion_title (str): Internal name for the promotion. + promotion_type (PromotionType): + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/promotion_response.py b/openapi_generated/pinterest_client/model/promotion_response.py new file mode 100644 index 0000000..9df0c27 --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_response.py @@ -0,0 +1,388 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.promotion_common import PromotionCommon + from openapi_generated.pinterest_client.model.promotion_response_all_of import PromotionResponseAllOf + from openapi_generated.pinterest_client.model.promotion_template_value import PromotionTemplateValue + from openapi_generated.pinterest_client.model.promotion_type import PromotionType + globals()['EntityStatus'] = EntityStatus + globals()['PromotionCommon'] = PromotionCommon + globals()['PromotionResponseAllOf'] = PromotionResponseAllOf + globals()['PromotionTemplateValue'] = PromotionTemplateValue + globals()['PromotionType'] = PromotionType + + +class PromotionResponse(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 = { + ('discount_status',): { + 'OTHER': "OTHER", + 'ACTIVE': "ACTIVE", + 'PAUSED': "PAUSED", + 'SCHEDULED': "SCHEDULED", + 'EXPIRED': "EXPIRED", + }, + } + + validations = { + ('external_id',): { + 'max_length': 64, + }, + ('template_values',): { + 'max_items': 2, + 'min_items': 0, + }, + ('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 { + 'external_id': (str,), # noqa: E501 + 'platform_type': (str,), # noqa: E501 + 'promotion_title': (str,), # noqa: E501 + 'promotion_code': (str,), # noqa: E501 + 'start_time': (int,), # noqa: E501 + 'end_time': (int,), # noqa: E501 + 'promotion_type': (PromotionType,), # noqa: E501 + 'template_values': ([PromotionTemplateValue],), # noqa: E501 + 'discount_status': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'ad_account_id': (str,), # noqa: E501 + 'status': (EntityStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'external_id': 'external_id', # noqa: E501 + 'platform_type': 'platform_type', # noqa: E501 + 'promotion_title': 'promotion_title', # noqa: E501 + 'promotion_code': 'promotion_code', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + 'promotion_type': 'promotion_type', # noqa: E501 + 'template_values': 'template_values', # noqa: E501 + 'discount_status': 'discount_status', # noqa: E501 + 'id': 'id', # noqa: E501 + 'ad_account_id': 'ad_account_id', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_title (str): Internal name for the promotion.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + promotion_type (PromotionType): [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + id (str): Promotion ID. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this promotion belongs to.. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_title (str): Internal name for the promotion.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + promotion_type (PromotionType): [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + id (str): Promotion ID. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this promotion belongs to.. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/promotion_response_all_of.py b/openapi_generated/pinterest_client/model/promotion_response_all_of.py new file mode 100644 index 0000000..e91d712 --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_response_all_of.py @@ -0,0 +1,280 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.entity_status import EntityStatus + globals()['EntityStatus'] = EntityStatus + + +class PromotionResponseAllOf(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 + 'ad_account_id': (str,), # noqa: E501 + 'status': (EntityStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'ad_account_id': 'ad_account_id', # 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 + """PromotionResponseAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Promotion ID. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this promotion belongs to.. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionResponseAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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): Promotion ID. [optional] # noqa: E501 + ad_account_id (str): The Ad Account ID that this promotion belongs to.. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/promotion_template_value.py b/openapi_generated/pinterest_client/model/promotion_template_value.py new file mode 100644 index 0000000..4444dff --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_template_value.py @@ -0,0 +1,270 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 PromotionTemplateValue(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 { + 'amount': (float,), # noqa: E501 + 'percent': (float,), # noqa: E501 + 'currency_code': (Currency,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount': 'amount', # noqa: E501 + 'percent': 'percent', # noqa: E501 + 'currency_code': 'currency_code', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionTemplateValue - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (float): Numeric value.. [optional] # noqa: E501 + percent (float): Percent value.. [optional] # noqa: E501 + currency_code (Currency): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionTemplateValue - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (float): Numeric value.. [optional] # noqa: E501 + percent (float): Percent value.. [optional] # noqa: E501 + currency_code (Currency): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/promotion_type.py b/openapi_generated/pinterest_client/model/promotion_type.py new file mode 100644 index 0000000..8175a95 --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_type.py @@ -0,0 +1,303 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 PromotionType(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',): { + 'VARIABLE': "VARIABLE", + 'SITEWIDE': "SITEWIDE", + 'CHECKOUT': "CHECKOUT", + 'SAVE_X_ON_Y': "SAVE_X_ON_Y", + 'BUY_X_GET_Y': "BUY_X_GET_Y", + 'SPEND_X_SAVE_Y': "SPEND_X_SAVE_Y", + 'FREE_SHIPPING': "FREE_SHIPPING", + 'FREE_SHIPPING_MINIMUM': "FREE_SHIPPING_MINIMUM", + 'FREE_SHIPPING_WITH_DISCOUNT': "FREE_SHIPPING_WITH_DISCOUNT", + 'SITEWIDE_IN_STORES': "SITEWIDE_IN_STORES", + 'EXTRA_PERCENT_OFF': "EXTRA_PERCENT_OFF", + 'GIFT_WITH_PURCHASE': "GIFT_WITH_PURCHASE", + 'GIFT_WITH_PURCHASE_MINIMUM': "GIFT_WITH_PURCHASE_MINIMUM", + 'FIXED': "FIXED", + 'PERCENT_OFF_CLEARANCE': "PERCENT_OFF_CLEARANCE", + 'X_OFF_Y': "X_OFF_Y", + 'GIFT_WITH_FIRST_PURCHASE': "GIFT_WITH_FIRST_PURCHASE", + 'BUY_X_GET_ONE_FREE': "BUY_X_GET_ONE_FREE", + 'CASH_BACK': "CASH_BACK", + 'POINTS_ON_ALL_PURCHASES': "POINTS_ON_ALL_PURCHASES", + 'BONUS': "BONUS", + 'POINTS_WITH_PURCHASE': "POINTS_WITH_PURCHASE", + }, + } + + 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): + """PromotionType - 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): Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported.., must be one of ["VARIABLE", "SITEWIDE", "CHECKOUT", "SAVE_X_ON_Y", "BUY_X_GET_Y", "SPEND_X_SAVE_Y", "FREE_SHIPPING", "FREE_SHIPPING_MINIMUM", "FREE_SHIPPING_WITH_DISCOUNT", "SITEWIDE_IN_STORES", "EXTRA_PERCENT_OFF", "GIFT_WITH_PURCHASE", "GIFT_WITH_PURCHASE_MINIMUM", "FIXED", "PERCENT_OFF_CLEARANCE", "X_OFF_Y", "GIFT_WITH_FIRST_PURCHASE", "BUY_X_GET_ONE_FREE", "CASH_BACK", "POINTS_ON_ALL_PURCHASES", "BONUS", "POINTS_WITH_PURCHASE", ] # noqa: E501 + + Keyword Args: + value (str): Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported.., must be one of ["VARIABLE", "SITEWIDE", "CHECKOUT", "SAVE_X_ON_Y", "BUY_X_GET_Y", "SPEND_X_SAVE_Y", "FREE_SHIPPING", "FREE_SHIPPING_MINIMUM", "FREE_SHIPPING_WITH_DISCOUNT", "SITEWIDE_IN_STORES", "EXTRA_PERCENT_OFF", "GIFT_WITH_PURCHASE", "GIFT_WITH_PURCHASE_MINIMUM", "FIXED", "PERCENT_OFF_CLEARANCE", "X_OFF_Y", "GIFT_WITH_FIRST_PURCHASE", "BUY_X_GET_ONE_FREE", "CASH_BACK", "POINTS_ON_ALL_PURCHASES", "BONUS", "POINTS_WITH_PURCHASE", ] # 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): + """PromotionType - 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): Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported.., must be one of ["VARIABLE", "SITEWIDE", "CHECKOUT", "SAVE_X_ON_Y", "BUY_X_GET_Y", "SPEND_X_SAVE_Y", "FREE_SHIPPING", "FREE_SHIPPING_MINIMUM", "FREE_SHIPPING_WITH_DISCOUNT", "SITEWIDE_IN_STORES", "EXTRA_PERCENT_OFF", "GIFT_WITH_PURCHASE", "GIFT_WITH_PURCHASE_MINIMUM", "FIXED", "PERCENT_OFF_CLEARANCE", "X_OFF_Y", "GIFT_WITH_FIRST_PURCHASE", "BUY_X_GET_ONE_FREE", "CASH_BACK", "POINTS_ON_ALL_PURCHASES", "BONUS", "POINTS_WITH_PURCHASE", ] # noqa: E501 + + Keyword Args: + value (str): Determines the displayed promotion text along with what parameters (if any) are needed to complete the template. This list is not finalized, and will be updated as new types are supported.., must be one of ["VARIABLE", "SITEWIDE", "CHECKOUT", "SAVE_X_ON_Y", "BUY_X_GET_Y", "SPEND_X_SAVE_Y", "FREE_SHIPPING", "FREE_SHIPPING_MINIMUM", "FREE_SHIPPING_WITH_DISCOUNT", "SITEWIDE_IN_STORES", "EXTRA_PERCENT_OFF", "GIFT_WITH_PURCHASE", "GIFT_WITH_PURCHASE_MINIMUM", "FIXED", "PERCENT_OFF_CLEARANCE", "X_OFF_Y", "GIFT_WITH_FIRST_PURCHASE", "BUY_X_GET_ONE_FREE", "CASH_BACK", "POINTS_ON_ALL_PURCHASES", "BONUS", "POINTS_WITH_PURCHASE", ] # 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/promotion_update_request.py b/openapi_generated/pinterest_client/model/promotion_update_request.py new file mode 100644 index 0000000..47ce3e2 --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_update_request.py @@ -0,0 +1,379 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.entity_status import EntityStatus + from openapi_generated.pinterest_client.model.promotion_common import PromotionCommon + from openapi_generated.pinterest_client.model.promotion_template_value import PromotionTemplateValue + from openapi_generated.pinterest_client.model.promotion_type import PromotionType + from openapi_generated.pinterest_client.model.promotion_update_request_all_of import PromotionUpdateRequestAllOf + globals()['EntityStatus'] = EntityStatus + globals()['PromotionCommon'] = PromotionCommon + globals()['PromotionTemplateValue'] = PromotionTemplateValue + globals()['PromotionType'] = PromotionType + globals()['PromotionUpdateRequestAllOf'] = PromotionUpdateRequestAllOf + + +class PromotionUpdateRequest(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 = { + ('discount_status',): { + 'OTHER': "OTHER", + 'ACTIVE': "ACTIVE", + 'PAUSED': "PAUSED", + 'SCHEDULED': "SCHEDULED", + 'EXPIRED': "EXPIRED", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^\d+$', # noqa: E501 + }, + }, + ('external_id',): { + 'max_length': 64, + }, + ('template_values',): { + 'max_items': 2, + '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 + 'external_id': (str,), # noqa: E501 + 'platform_type': (str,), # noqa: E501 + 'promotion_title': (str,), # noqa: E501 + 'promotion_code': (str,), # noqa: E501 + 'start_time': (int,), # noqa: E501 + 'end_time': (int,), # noqa: E501 + 'promotion_type': (PromotionType,), # noqa: E501 + 'template_values': ([PromotionTemplateValue],), # noqa: E501 + 'discount_status': (str,), # noqa: E501 + 'status': (EntityStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'external_id': 'external_id', # noqa: E501 + 'platform_type': 'platform_type', # noqa: E501 + 'promotion_title': 'promotion_title', # noqa: E501 + 'promotion_code': 'promotion_code', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + 'promotion_type': 'promotion_type', # noqa: E501 + 'template_values': 'template_values', # noqa: E501 + 'discount_status': 'discount_status', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionUpdateRequest - a model defined in OpenAPI + + Keyword Args: + id (str): Promotion ID + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_title (str): Internal name for the promotion.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + promotion_type (PromotionType): [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionUpdateRequest - a model defined in OpenAPI + + Keyword Args: + id (str): Promotion ID + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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_id (str): Platform-specific ID for this promotion. Will be null for promotions first created within Pinterest.. [optional] # noqa: E501 + platform_type (str): The source integration platform used when creating the promotion. Currently supported values are 'DEFAULT' and 'SHOPIFY'.. [optional] # noqa: E501 + promotion_title (str): Internal name for the promotion.. [optional] # noqa: E501 + promotion_code (str): Code that can be used to redeem a promotion.. [optional] # noqa: E501 + start_time (int): Promotion start time. Unix timestamp in seconds. Independent of campaign start time.. [optional] # noqa: E501 + end_time (int): Promotion end time. Unix timestamp in seconds. Independent of campaign end time.. [optional] # noqa: E501 + promotion_type (PromotionType): [optional] # noqa: E501 + template_values ([PromotionTemplateValue]): List of values to be inserted in the promotion type-specific template.. [optional] # noqa: E501 + discount_status (str): Discount status based on the current time and start and end time of discount. [optional] # noqa: E501 + status (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/promotion_update_request_all_of.py b/openapi_generated/pinterest_client/model/promotion_update_request_all_of.py new file mode 100644 index 0000000..691e357 --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotion_update_request_all_of.py @@ -0,0 +1,277 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.entity_status import EntityStatus + globals()['EntityStatus'] = EntityStatus + + +class PromotionUpdateRequestAllOf(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 + 'status': (EntityStatus,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'status': 'status', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """PromotionUpdateRequestAllOf - a model defined in OpenAPI + + Args: + id (str): Promotion ID + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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 + """PromotionUpdateRequestAllOf - a model defined in OpenAPI + + Args: + id (str): Promotion ID + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (EntityStatus): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_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/promotions_response.py b/openapi_generated/pinterest_client/model/promotions_response.py new file mode 100644 index 0000000..e2c4f4f --- /dev/null +++ b/openapi_generated/pinterest_client/model/promotions_response.py @@ -0,0 +1,262 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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.promotion_array_element import PromotionArrayElement + globals()['PromotionArrayElement'] = PromotionArrayElement + + +class PromotionsResponse(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 { + 'promotions': ([PromotionArrayElement],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'promotions': 'promotions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PromotionsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + promotions ([PromotionArrayElement]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """PromotionsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + promotions ([PromotionArrayElement]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/reporting_time_zone.py b/openapi_generated/pinterest_client/model/reporting_time_zone.py new file mode 100644 index 0000000..22bd183 --- /dev/null +++ b/openapi_generated/pinterest_client/model/reporting_time_zone.py @@ -0,0 +1,283 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.17.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ReportingTimeZone(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',): { + 'PINTEREST_TIME_ZONE': "PINTEREST_TIME_ZONE", + 'AD_ACCOUNT_TIME_ZONE': "AD_ACCOUNT_TIME_ZONE", + }, + } + + 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): + """ReportingTimeZone - 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): Closed beta Specify the timezone to be applied for the reporting.., must be one of ["PINTEREST_TIME_ZONE", "AD_ACCOUNT_TIME_ZONE", ] # noqa: E501 + + Keyword Args: + value (str): Closed beta Specify the timezone to be applied for the reporting.., must be one of ["PINTEREST_TIME_ZONE", "AD_ACCOUNT_TIME_ZONE", ] # 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): + """ReportingTimeZone - 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): Closed beta Specify the timezone to be applied for the reporting.., must be one of ["PINTEREST_TIME_ZONE", "AD_ACCOUNT_TIME_ZONE", ] # noqa: E501 + + Keyword Args: + value (str): Closed beta Specify the timezone to be applied for the reporting.., must be one of ["PINTEREST_TIME_ZONE", "AD_ACCOUNT_TIME_ZONE", ] # 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/resource_error.py b/openapi_generated/pinterest_client/model/resource_error.py new file mode 100644 index 0000000..ed913e4 --- /dev/null +++ b/openapi_generated/pinterest_client/model/resource_error.py @@ -0,0 +1,268 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 ResourceError(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, code, message, *args, **kwargs): # noqa: E501 + """ResourceError - 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 + """ResourceError - 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/title_keywords_filter.py b/openapi_generated/pinterest_client/model/title_keywords_filter.py new file mode 100644 index 0000000..f3f1e5e --- /dev/null +++ b/openapi_generated/pinterest_client/model/title_keywords_filter.py @@ -0,0 +1,261 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 TitleKeywordsFilter(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 { + 'title_keywords': (CatalogsProductGroupMultipleStringCriteria,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title_keywords': 'TITLE_KEYWORDS', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title_keywords, *args, **kwargs): # noqa: E501 + """TitleKeywordsFilter - a model defined in OpenAPI + + Args: + title_keywords (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.title_keywords = title_keywords + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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, title_keywords, *args, **kwargs): # noqa: E501 + """TitleKeywordsFilter - a model defined in OpenAPI + + Args: + title_keywords (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.title_keywords = title_keywords + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is 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/trending_keyword.py b/openapi_generated/pinterest_client/model/trending_keyword.py new file mode 100644 index 0000000..90f9f93 --- /dev/null +++ b/openapi_generated/pinterest_client/model/trending_keyword.py @@ -0,0 +1,275 @@ +""" + Pinterest REST API + + Pinterest's REST API # noqa: E501 + + The version of the OpenAPI document: 5.15.0 + Contact: pinterest-api@pinterest.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from openapi_generated.pinterest_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_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 TrendingKeyword(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 = { + ('keyword',): { + '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 { + 'keyword': (str,), # noqa: E501 + 'pct_growth_wow': (int,), # noqa: E501 + 'pct_growth_mom': (int,), # noqa: E501 + 'pct_growth_yoy': (int,), # noqa: E501 + 'time_series': ({str: (int,)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'keyword': 'keyword', # noqa: E501 + 'pct_growth_wow': 'pct_growth_wow', # noqa: E501 + 'pct_growth_mom': 'pct_growth_mom', # noqa: E501 + 'pct_growth_yoy': 'pct_growth_yoy', # noqa: E501 + 'time_series': 'time_series', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TrendingKeyword - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + keyword (str): The keyword that is trending.. [optional] # noqa: E501 + pct_growth_wow (int): The week-over-week percent change in search volume for this keyword.
For example, a value of \"50\" would represent a 50% increase in searches in the last seven days compared to the week prior.
**Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% week-over-week growth.. [optional] # noqa: E501 + pct_growth_mom (int): The month-over-month percent change in search volume for this keyword.
For example, a value of \"400\" would represent a 400% increase in searches in the last 30 days compared to the month prior.
**Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% month-over-month growth.. [optional] # noqa: E501 + pct_growth_yoy (int): The year-over-year percent change in search volume for this keyword.
For example, a value of \"-5\" would represent a 5% decrease in searches in the last 365 days compared to the month prior.
**Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% year-over-year growth.. [optional] # noqa: E501 + time_series ({str: (int,)}): A sequence of weekly observations of the relative search volume for this keyword over the past year.
These values are normalized to a [0-100] range, and can be used to visualize the history of user interest in this keyword. By default, normalization is applied independently to the time series of each keyword, but the `normalize_against_group` query parameter can be used in cases where you wish to compare relative volume between keywords.
**Note**: The date of each observation is in ISO-8601 format and represents the *end* of the week. For example, a value of `2023-10-31` would include searches that happened between `2023-10-25` and `2023-10-31`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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 + """TrendingKeyword - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + keyword (str): The keyword that is trending.. [optional] # noqa: E501 + pct_growth_wow (int): The week-over-week percent change in search volume for this keyword.
For example, a value of \"50\" would represent a 50% increase in searches in the last seven days compared to the week prior.
**Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% week-over-week growth.. [optional] # noqa: E501 + pct_growth_mom (int): The month-over-month percent change in search volume for this keyword.
For example, a value of \"400\" would represent a 400% increase in searches in the last 30 days compared to the month prior.
**Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% month-over-month growth.. [optional] # noqa: E501 + pct_growth_yoy (int): The year-over-year percent change in search volume for this keyword.
For example, a value of \"-5\" would represent a 5% decrease in searches in the last 365 days compared to the month prior.
**Note**: growth rates are rounded, with a maximum of +/- 10000% change. A value of 10001 indicates that this keyword experienced > 10000% year-over-year growth.. [optional] # noqa: E501 + time_series ({str: (int,)}): A sequence of weekly observations of the relative search volume for this keyword over the past year.
These values are normalized to a [0-100] range, and can be used to visualize the history of user interest in this keyword. By default, normalization is applied independently to the time series of each keyword, but the `normalize_against_group` query parameter can be used in cases where you wish to compare relative volume between keywords.
**Note**: The date of each observation is in ISO-8601 format and represents the *end* of the week. For example, a value of `2023-10-31` would include searches that happened between `2023-10-25` and `2023-10-31`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_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/rest.py b/openapi_generated/pinterest_client/rest.py index 7787226..7959887 100644 --- a/openapi_generated/pinterest_client/rest.py +++ b/openapi_generated/pinterest_client/rest.py @@ -36,11 +36,11 @@ def __init__(self, resp): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.urllib3_response.headers.get(name, default) class RESTClientObject(object): diff --git a/requirements.txt b/requirements.txt index ce41c00..8a8de0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 == 1.26.20 \ No newline at end of file +urllib3>=1.26,<3 \ No newline at end of file diff --git a/setup.py b/setup.py index 1b348e5..5fdb39d 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ import os -VERSION = "0.1.10" +VERSION = "0.1.11" _IS_TEST_BUILD = os.environ.get("IS_TEST_BUILD", 0) if _IS_TEST_BUILD: @@ -31,7 +31,7 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3==1.26.20", + "urllib3>=1.26,<3", "python-dateutil", ] diff --git a/spec/Makefile b/spec/Makefile index 832ff16..68e8f1a 100644 --- a/spec/Makefile +++ b/spec/Makefile @@ -13,8 +13,9 @@ endif all: download_spec validate_spec generate_client patch_client ## General external client download_spec: ## Download openapi.yaml from public pinterest github repo + # TODO: update to use the main branch; last supported spec is 5.14.0 @echo ====Download openapi.yaml from public pinterest github repo==== - python utils/download_file.py https://raw.githubusercontent.com/pinterest/api-description/main/v5/openapi.yaml './openapi.yaml' + python utils/download_file.py https://raw.githubusercontent.com/pinterest/api-description/774983b2025d0f29ff11bab1bb3d215404abe3e8/v5/openapi.yaml './openapi.yaml' validate_spec: ## Validates the openapi spec: sdk.yaml @echo ====Validates the openapi spec: sdk.yaml==== @@ -26,8 +27,9 @@ generate_client: ## Generates a python client rm -rf ../test ../.gitlab-ci.yml ../.travis.yml ../git_push.sh patch_client: ## Patch the generated client - @echo ====Execiting patches==== + @echo ====Executing patches==== python ./patches/remove_bool_none_type.py + python ./patches/fix_urllib3_deprecations.py help: ## Show list of targets and purposes. @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' \ No newline at end of file diff --git a/spec/config.yml b/spec/config.yml index eb3a160..8c46d89 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.10 +packageVersion: 0.1.11 projectName: Pinterest_Generated_Client templateDir: templates packageName: openapi_generated.pinterest_client diff --git a/spec/patches/fix_urllib3_deprecations.py b/spec/patches/fix_urllib3_deprecations.py new file mode 100644 index 0000000..f4ed387 --- /dev/null +++ b/spec/patches/fix_urllib3_deprecations.py @@ -0,0 +1,74 @@ +""" +This script fixes deprecated urllib3 methods in the generated code by replacing: +- response.getheader('content-type') → response.headers.get('content-type') +- response.getheaders() → response.headers + +This addresses deprecation warnings that will become breaking errors in urllib3 2.6.0. +Based on urllib3 v2.0 migration guide: https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html + +Files affected: +- openapi_generated/pinterest_client/rest.py (lines 37-43) +- openapi_generated/pinterest_client/api_client.py (lines 224, 243, 320) +- openapi_generated/pinterest_client/exceptions.py (line 107) +""" +import os +import re + +directory = '../openapi_generated' + +# Define the replacements - apply multiple times until no more changes +def apply_replacements(content): + """Apply all replacements until no more changes are made""" + original_content = content + + # First: Clean up any multiple urllib3_response references (make it idempotent) + content = re.sub(r'(\.urllib3_response)+', '.urllib3_response', content) + + # Second: Replace deprecated getheader() calls with headers.get() + # All response objects are RESTResponse wrappers, so use .urllib3_response.headers + content = re.sub(r'(response_data|response|http_resp)\.getheader\(([^)]+)\)', r'\1.urllib3_response.headers.get(\2)', content) + + # Third: Replace deprecated getheaders() calls with headers + # All response objects are RESTResponse wrappers, so use .urllib3_response.headers + content = re.sub(r'(response_data|response|http_resp)\.getheaders\(\)', r'\1.urllib3_response.headers', content) + + return content + +print("Starting the script to fix deprecated urllib3 methods in the 'openapi_generated' directory...") +print("This ensures compatibility with both urllib3 1.x and 2.x") + +files_modified = 0 +total_replacements = 0 + +for root, dirs, files in os.walk(directory): + for file in files: + if file.endswith(".py"): + file_path = os.path.join(root, file) + + try: + with open(file_path, 'r', encoding='utf-8') as f: + content = f.read() + + original_content = content + + # Apply all replacements using the function + content = apply_replacements(content) + + # Write back if changes were made + if content != original_content: + with open(file_path, 'w', encoding='utf-8') as f: + f.write(content) + + # Count replacements made in this file + file_replacements = len(original_content) - len(content) + content.count('urllib3_response') - original_content.count('urllib3_response') + + print(f"Modified: {file_path} ({file_replacements} replacements)") + files_modified += 1 + total_replacements += file_replacements + + except Exception as e: + print(f"Error processing {file_path}: {e}") + +print(f"Script completed. Modified {files_modified} files with {total_replacements} total replacements.") +print("Deprecated urllib3 methods have been updated to use the new headers API.") +print("Your package now supports both urllib3 1.x and 2.x!") diff --git a/spec/templates/requirements.mustache b/spec/templates/requirements.mustache index ce41c00..8a8de0b 100644 --- a/spec/templates/requirements.mustache +++ b/spec/templates/requirements.mustache @@ -1,3 +1,3 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 == 1.26.20 \ No newline at end of file +urllib3>=1.26,<3 \ No newline at end of file diff --git a/spec/templates/setup.mustache b/spec/templates/setup.mustache index 33b7303..0b1f307 100644 --- a/spec/templates/setup.mustache +++ b/spec/templates/setup.mustache @@ -25,7 +25,7 @@ NAME = "{{{projectName}}}" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3==1.26.20", + "urllib3>=1.26,<3", "python-dateutil", {{#asyncio}} "aiohttp >= 3.0.0",