# coding: utf-8

"""
    Pinterest REST API

    Pinterest's REST API

    The version of the OpenAPI document: 5.23.0
    Contact: blah+oapicf@cliffano.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class CatalogsFeedValidationErrors(BaseModel):
    """
    CatalogsFeedValidationErrors
    """ # noqa: E501
    adult_invalid: Optional[StrictInt] = Field(default=None, description="Some items have invalid adult values.", alias="ADULT_INVALID")
    adwords_format_invalid: Optional[StrictInt] = Field(default=None, description="Some adwords links contain too many characters.", alias="ADWORDS_FORMAT_INVALID")
    availability_invalid: Optional[StrictInt] = Field(default=None, description="Some items are missing an availability value in their product metadata, those items will not be published.", alias="AVAILABILITY_INVALID")
    blocklisted_image_signature: Optional[StrictInt] = Field(default=None, description="Some items were not published because they don't meet Pinterest's Merchant Guidelines.", alias="BLOCKLISTED_IMAGE_SIGNATURE")
    delimiter_error: Optional[StrictInt] = Field(default=None, description="Your feed includes data with formatting errors.", alias="DELIMITER_ERROR")
    description_missing: Optional[StrictInt] = Field(default=None, description="Some items are missing a description in their product metadata, those items will not be published.", alias="DESCRIPTION_MISSING")
    duplicate_products: Optional[StrictInt] = Field(default=None, description="Some products are duplicated.", alias="DUPLICATE_PRODUCTS")
    encoding_error: Optional[StrictInt] = Field(default=None, description="Your feed includes data with an unsupported encoding format.", alias="ENCODING_ERROR")
    feed_length_too_long: Optional[StrictInt] = Field(default=None, description="Your feed contains too many items, some items will not be published.", alias="FEED_LENGTH_TOO_LONG")
    feed_too_small: Optional[StrictInt] = Field(default=None, description="Your feed couldn't be validated because the file doesn't contain the minimum number of lines required.", alias="FEED_TOO_SMALL")
    fetch_error: Optional[StrictInt] = Field(default=None, description="Pinterest couldn't download your feed.", alias="FETCH_ERROR")
    fetch_inactive_feed_error: Optional[StrictInt] = Field(default=None, description="Your feed wasn't ingested because it hasn’t changed in the previous 90 days.", alias="FETCH_INACTIVE_FEED_ERROR")
    image_link_invalid: Optional[StrictInt] = Field(default=None, description="Some image links are formatted incorrectly.", alias="IMAGE_LINK_INVALID")
    image_link_length_too_long: Optional[StrictInt] = Field(default=None, description="Some items have image_link URLs that contain too many characters, so those items will not be published.", alias="IMAGE_LINK_LENGTH_TOO_LONG")
    image_link_missing: Optional[StrictInt] = Field(default=None, description="Some items are missing an image link URL in their product metadata, those items will not be published.", alias="IMAGE_LINK_MISSING")
    internal_service_error: Optional[StrictInt] = Field(default=None, description="We experienced a technical difficulty and were unable to ingest your feed. The next ingestion will happen in 24 hours.", alias="INTERNAL_SERVICE_ERROR")
    invalid_domain: Optional[StrictInt] = Field(default=None, description="Some of your product link values don't match the verified domain associated with this account.", alias="INVALID_DOMAIN")
    item_main_image_download_failure: Optional[StrictInt] = Field(default=None, description="Some items' main images can't be found.", alias="ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE")
    itemid_missing: Optional[StrictInt] = Field(default=None, description="Some items are missing an item id in their product metadata, those items will not be published.", alias="ITEMID_MISSING")
    link_format_invalid: Optional[StrictInt] = Field(default=None, description="Some link values are formatted incorrectly.", alias="LINK_FORMAT_INVALID")
    link_length_too_long: Optional[StrictInt] = Field(default=None, description="Some product links contain too many characters, those items will not be published.", alias="LINK_LENGTH_TOO_LONG")
    list_price_invalid: Optional[StrictInt] = Field(default=None, description="Some items have list price formatting errors in their product metadata, those items will not be published.", alias="LIST_PRICE_INVALID")
    malformed_xml: Optional[StrictInt] = Field(default=None, description="Your feed couldn't be validated because the xml file is formatted incorrectly.", alias="MALFORMED_XML")
    max_items_per_item_group_exceeded: Optional[StrictInt] = Field(default=None, description="Some items exceed the maximum number of items per item group, those items will not be published.", alias="MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED")
    no_verified_domain: Optional[StrictInt] = Field(default=None, description="Your merchant domain needs to be claimed.", alias="NO_VERIFIED_DOMAIN")
    parse_line_error: Optional[StrictInt] = Field(default=None, description="Your feed contains formatting errors for some items.", alias="PARSE_LINE_ERROR")
    pinjoin_content_unsafe: Optional[StrictInt] = Field(default=None, description="Some items were not published because they don't meet Pinterest's Merchant Guidelines.", alias="PINJOIN_CONTENT_UNSAFE")
    price_cannot_be_determined: Optional[StrictInt] = Field(default=None, description="Some items were not published because price cannot be determined. The price, list price, and sale price are all different, so those items will not be published.", alias="PRICE_CANNOT_BE_DETERMINED")
    price_missing: Optional[StrictInt] = Field(default=None, description="Some products are missing a price, those items will not be published.", alias="PRICE_MISSING")
    product_link_missing: Optional[StrictInt] = Field(default=None, description="Some items are missing a link URL in their product metadata, those items will not be published.", alias="PRODUCT_LINK_MISSING")
    product_price_invalid: Optional[StrictInt] = Field(default=None, description="Some items have price formatting errors in their product metadata, those items will not be published.", alias="PRODUCT_PRICE_INVALID")
    required_columns_missing: Optional[StrictInt] = Field(default=None, description="Your feed is missing some required column headers.", alias="REQUIRED_COLUMNS_MISSING")
    title_missing: Optional[StrictInt] = Field(default=None, description="Some items are missing a title in their product metadata, those items will not be published.", alias="TITLE_MISSING")
    __properties: ClassVar[List[str]] = ["ADULT_INVALID", "ADWORDS_FORMAT_INVALID", "AVAILABILITY_INVALID", "BLOCKLISTED_IMAGE_SIGNATURE", "DELIMITER_ERROR", "DESCRIPTION_MISSING", "DUPLICATE_PRODUCTS", "ENCODING_ERROR", "FEED_LENGTH_TOO_LONG", "FEED_TOO_SMALL", "FETCH_ERROR", "FETCH_INACTIVE_FEED_ERROR", "IMAGE_LINK_INVALID", "IMAGE_LINK_LENGTH_TOO_LONG", "IMAGE_LINK_MISSING", "INTERNAL_SERVICE_ERROR", "INVALID_DOMAIN", "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE", "ITEMID_MISSING", "LINK_FORMAT_INVALID", "LINK_LENGTH_TOO_LONG", "LIST_PRICE_INVALID", "MALFORMED_XML", "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED", "NO_VERIFIED_DOMAIN", "PARSE_LINE_ERROR", "PINJOIN_CONTENT_UNSAFE", "PRICE_CANNOT_BE_DETERMINED", "PRICE_MISSING", "PRODUCT_LINK_MISSING", "PRODUCT_PRICE_INVALID", "REQUIRED_COLUMNS_MISSING", "TITLE_MISSING"]

    model_config = ConfigDict(
        populate_by_name=True,
        validate_assignment=True,
        protected_namespaces=(),
    )


    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.model_dump(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> Optional[Self]:
        """Create an instance of CatalogsFeedValidationErrors from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self) -> Dict[str, Any]:
        """Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        """
        excluded_fields: Set[str] = set([
        ])

        _dict = self.model_dump(
            by_alias=True,
            exclude=excluded_fields,
            exclude_none=True,
        )
        return _dict

    @classmethod
    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
        """Create an instance of CatalogsFeedValidationErrors from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return cls.model_validate(obj)

        _obj = cls.model_validate({
            "ADULT_INVALID": obj.get("ADULT_INVALID"),
            "ADWORDS_FORMAT_INVALID": obj.get("ADWORDS_FORMAT_INVALID"),
            "AVAILABILITY_INVALID": obj.get("AVAILABILITY_INVALID"),
            "BLOCKLISTED_IMAGE_SIGNATURE": obj.get("BLOCKLISTED_IMAGE_SIGNATURE"),
            "DELIMITER_ERROR": obj.get("DELIMITER_ERROR"),
            "DESCRIPTION_MISSING": obj.get("DESCRIPTION_MISSING"),
            "DUPLICATE_PRODUCTS": obj.get("DUPLICATE_PRODUCTS"),
            "ENCODING_ERROR": obj.get("ENCODING_ERROR"),
            "FEED_LENGTH_TOO_LONG": obj.get("FEED_LENGTH_TOO_LONG"),
            "FEED_TOO_SMALL": obj.get("FEED_TOO_SMALL"),
            "FETCH_ERROR": obj.get("FETCH_ERROR"),
            "FETCH_INACTIVE_FEED_ERROR": obj.get("FETCH_INACTIVE_FEED_ERROR"),
            "IMAGE_LINK_INVALID": obj.get("IMAGE_LINK_INVALID"),
            "IMAGE_LINK_LENGTH_TOO_LONG": obj.get("IMAGE_LINK_LENGTH_TOO_LONG"),
            "IMAGE_LINK_MISSING": obj.get("IMAGE_LINK_MISSING"),
            "INTERNAL_SERVICE_ERROR": obj.get("INTERNAL_SERVICE_ERROR"),
            "INVALID_DOMAIN": obj.get("INVALID_DOMAIN"),
            "ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE": obj.get("ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE"),
            "ITEMID_MISSING": obj.get("ITEMID_MISSING"),
            "LINK_FORMAT_INVALID": obj.get("LINK_FORMAT_INVALID"),
            "LINK_LENGTH_TOO_LONG": obj.get("LINK_LENGTH_TOO_LONG"),
            "LIST_PRICE_INVALID": obj.get("LIST_PRICE_INVALID"),
            "MALFORMED_XML": obj.get("MALFORMED_XML"),
            "MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED": obj.get("MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED"),
            "NO_VERIFIED_DOMAIN": obj.get("NO_VERIFIED_DOMAIN"),
            "PARSE_LINE_ERROR": obj.get("PARSE_LINE_ERROR"),
            "PINJOIN_CONTENT_UNSAFE": obj.get("PINJOIN_CONTENT_UNSAFE"),
            "PRICE_CANNOT_BE_DETERMINED": obj.get("PRICE_CANNOT_BE_DETERMINED"),
            "PRICE_MISSING": obj.get("PRICE_MISSING"),
            "PRODUCT_LINK_MISSING": obj.get("PRODUCT_LINK_MISSING"),
            "PRODUCT_PRICE_INVALID": obj.get("PRODUCT_PRICE_INVALID"),
            "REQUIRED_COLUMNS_MISSING": obj.get("REQUIRED_COLUMNS_MISSING"),
            "TITLE_MISSING": obj.get("TITLE_MISSING")
        })
        return _obj


