# DO NOT EDIT! This file is automatically generated

import datetime
import enum
import typing

import attr

from commercetools.types._base import PagedQueryResponse, Update, UpdateAction
from commercetools.types._common import Reference, ReferenceTypeId, Resource

if typing.TYPE_CHECKING:
    from ._cart_discount import CartDiscountReference
    from ._channel import ChannelReference
    from ._common import Address, LocalizedString, Money, Price, TypedMoney
    from ._customer_group import CustomerGroupReference
    from ._discount_code import DiscountCodeReference
    from ._order import Delivery, ItemState, PaymentInfo
    from ._payment import PaymentReference
    from ._product import ProductVariant
    from ._product_type import ProductTypeReference
    from ._shipping_method import (
        ShippingMethodReference,
        ShippingRate,
        ShippingRateDraft,
    )
    from ._shopping_list import ShoppingListReference
    from ._tax_category import SubRate, TaxCategoryReference, TaxRate
    from ._type import CustomFields, CustomFieldsDraft, FieldContainer, TypeReference
__all__ = [
    "Cart",
    "CartAddCustomLineItemAction",
    "CartAddDiscountCodeAction",
    "CartAddItemShippingAddressAction",
    "CartAddLineItemAction",
    "CartAddPaymentAction",
    "CartAddShoppingListAction",
    "CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction",
    "CartApplyDeltaToLineItemShippingDetailsTargetsAction",
    "CartChangeCustomLineItemMoneyAction",
    "CartChangeCustomLineItemQuantityAction",
    "CartChangeLineItemQuantityAction",
    "CartChangeTaxCalculationModeAction",
    "CartChangeTaxModeAction",
    "CartChangeTaxRoundingModeAction",
    "CartDraft",
    "CartOrigin",
    "CartPagedQueryResponse",
    "CartRecalculateAction",
    "CartReference",
    "CartRemoveCustomLineItemAction",
    "CartRemoveDiscountCodeAction",
    "CartRemoveItemShippingAddressAction",
    "CartRemoveLineItemAction",
    "CartRemovePaymentAction",
    "CartSetAnonymousIdAction",
    "CartSetBillingAddressAction",
    "CartSetCartTotalTaxAction",
    "CartSetCountryAction",
    "CartSetCustomFieldAction",
    "CartSetCustomLineItemCustomFieldAction",
    "CartSetCustomLineItemCustomTypeAction",
    "CartSetCustomLineItemShippingDetailsAction",
    "CartSetCustomLineItemTaxAmountAction",
    "CartSetCustomLineItemTaxRateAction",
    "CartSetCustomShippingMethodAction",
    "CartSetCustomTypeAction",
    "CartSetCustomerEmailAction",
    "CartSetCustomerGroupAction",
    "CartSetCustomerIdAction",
    "CartSetDeleteDaysAfterLastModificationAction",
    "CartSetLineItemCustomFieldAction",
    "CartSetLineItemCustomTypeAction",
    "CartSetLineItemPriceAction",
    "CartSetLineItemShippingDetailsAction",
    "CartSetLineItemTaxAmountAction",
    "CartSetLineItemTaxRateAction",
    "CartSetLineItemTotalPriceAction",
    "CartSetLocaleAction",
    "CartSetShippingAddressAction",
    "CartSetShippingMethodAction",
    "CartSetShippingMethodTaxAmountAction",
    "CartSetShippingMethodTaxRateAction",
    "CartSetShippingRateInputAction",
    "CartState",
    "CartUpdate",
    "CartUpdateAction",
    "CartUpdateItemShippingAddressAction",
    "ClassificationShippingRateInput",
    "ClassificationShippingRateInputDraft",
    "CustomLineItem",
    "CustomLineItemDraft",
    "DiscountCodeInfo",
    "DiscountCodeState",
    "DiscountedLineItemPortion",
    "DiscountedLineItemPrice",
    "DiscountedLineItemPriceForQuantity",
    "ExternalLineItemTotalPrice",
    "ExternalTaxAmountDraft",
    "ExternalTaxRateDraft",
    "InventoryMode",
    "ItemShippingDetails",
    "ItemShippingDetailsDraft",
    "ItemShippingTarget",
    "LineItem",
    "LineItemDraft",
    "LineItemMode",
    "LineItemPriceMode",
    "ProductPublishScope",
    "ReplicaCartDraft",
    "RoundingMode",
    "ScoreShippingRateInput",
    "ScoreShippingRateInputDraft",
    "ShippingInfo",
    "ShippingMethodState",
    "ShippingRateInput",
    "ShippingRateInputDraft",
    "TaxCalculationMode",
    "TaxMode",
    "TaxPortion",
    "TaxedItemPrice",
    "TaxedPrice",
]


@attr.s(auto_attribs=True, init=False, repr=False)
class CartDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartDraftSchema`."
    #: :class:`str`
    currency: typing.Optional["str"]
    #: Optional :class:`str` `(Named` ``customerId`` `in Commercetools)`
    customer_id: typing.Optional[str]
    #: Optional :class:`str` `(Named` ``customerEmail`` `in Commercetools)`
    customer_email: typing.Optional[str]
    #: Optional :class:`commercetools.types.CustomerGroupReference` `(Named` ``customerGroup`` `in Commercetools)`
    customer_group: typing.Optional["CustomerGroupReference"]
    #: Optional :class:`str` `(Named` ``anonymousId`` `in Commercetools)`
    anonymous_id: typing.Optional[str]
    #: Optional :class:`str`
    country: typing.Optional[str]
    #: Optional :class:`commercetools.types.InventoryMode` `(Named` ``inventoryMode`` `in Commercetools)`
    inventory_mode: typing.Optional["InventoryMode"]
    #: Optional :class:`commercetools.types.TaxMode` `(Named` ``taxMode`` `in Commercetools)`
    tax_mode: typing.Optional["TaxMode"]
    #: Optional :class:`commercetools.types.RoundingMode` `(Named` ``taxRoundingMode`` `in Commercetools)`
    tax_rounding_mode: typing.Optional["RoundingMode"]
    #: Optional :class:`commercetools.types.TaxCalculationMode` `(Named` ``taxCalculationMode`` `in Commercetools)`
    tax_calculation_mode: typing.Optional["TaxCalculationMode"]
    #: Optional list of :class:`commercetools.types.LineItemDraft` `(Named` ``lineItems`` `in Commercetools)`
    line_items: typing.Optional[typing.List["LineItemDraft"]]
    #: Optional list of :class:`commercetools.types.CustomLineItemDraft` `(Named` ``customLineItems`` `in Commercetools)`
    custom_line_items: typing.Optional[typing.List["CustomLineItemDraft"]]
    #: Optional :class:`commercetools.types.Address` `(Named` ``shippingAddress`` `in Commercetools)`
    shipping_address: typing.Optional["Address"]
    #: Optional :class:`commercetools.types.Address` `(Named` ``billingAddress`` `in Commercetools)`
    billing_address: typing.Optional["Address"]
    #: Optional :class:`commercetools.types.ShippingMethodReference` `(Named` ``shippingMethod`` `in Commercetools)`
    shipping_method: typing.Optional["ShippingMethodReference"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRateForShippingMethod`` `in Commercetools)`
    external_tax_rate_for_shipping_method: typing.Optional["ExternalTaxRateDraft"]
    #: Optional :class:`commercetools.types.CustomFieldsDraft`
    custom: typing.Optional["CustomFieldsDraft"]
    #: Optional :class:`str`
    locale: typing.Optional[str]
    #: Optional :class:`int` `(Named` ``deleteDaysAfterLastModification`` `in Commercetools)`
    delete_days_after_last_modification: typing.Optional[int]
    #: Optional :class:`commercetools.types.CartOrigin`
    origin: typing.Optional["CartOrigin"]
    #: Optional :class:`commercetools.types.ShippingRateInputDraft` `(Named` ``shippingRateInput`` `in Commercetools)`
    shipping_rate_input: typing.Optional["ShippingRateInputDraft"]
    #: Optional list of :class:`commercetools.types.Address` `(Named` ``itemShippingAddresses`` `in Commercetools)`
    item_shipping_addresses: typing.Optional[typing.List["Address"]]

    def __init__(
        self,
        *,
        currency: typing.Optional["str"] = None,
        customer_id: typing.Optional[str] = None,
        customer_email: typing.Optional[str] = None,
        customer_group: typing.Optional["CustomerGroupReference"] = None,
        anonymous_id: typing.Optional[str] = None,
        country: typing.Optional[str] = None,
        inventory_mode: typing.Optional["InventoryMode"] = None,
        tax_mode: typing.Optional["TaxMode"] = None,
        tax_rounding_mode: typing.Optional["RoundingMode"] = None,
        tax_calculation_mode: typing.Optional["TaxCalculationMode"] = None,
        line_items: typing.Optional[typing.List["LineItemDraft"]] = None,
        custom_line_items: typing.Optional[typing.List["CustomLineItemDraft"]] = None,
        shipping_address: typing.Optional["Address"] = None,
        billing_address: typing.Optional["Address"] = None,
        shipping_method: typing.Optional["ShippingMethodReference"] = None,
        external_tax_rate_for_shipping_method: typing.Optional[
            "ExternalTaxRateDraft"
        ] = None,
        custom: typing.Optional["CustomFieldsDraft"] = None,
        locale: typing.Optional[str] = None,
        delete_days_after_last_modification: typing.Optional[int] = None,
        origin: typing.Optional["CartOrigin"] = None,
        shipping_rate_input: typing.Optional["ShippingRateInputDraft"] = None,
        item_shipping_addresses: typing.Optional[typing.List["Address"]] = None
    ) -> None:
        self.currency = currency
        self.customer_id = customer_id
        self.customer_email = customer_email
        self.customer_group = customer_group
        self.anonymous_id = anonymous_id
        self.country = country
        self.inventory_mode = inventory_mode
        self.tax_mode = tax_mode
        self.tax_rounding_mode = tax_rounding_mode
        self.tax_calculation_mode = tax_calculation_mode
        self.line_items = line_items
        self.custom_line_items = custom_line_items
        self.shipping_address = shipping_address
        self.billing_address = billing_address
        self.shipping_method = shipping_method
        self.external_tax_rate_for_shipping_method = (
            external_tax_rate_for_shipping_method
        )
        self.custom = custom
        self.locale = locale
        self.delete_days_after_last_modification = delete_days_after_last_modification
        self.origin = origin
        self.shipping_rate_input = shipping_rate_input
        self.item_shipping_addresses = item_shipping_addresses

    def __repr__(self) -> str:
        return (
            "CartDraft(currency=%r, customer_id=%r, customer_email=%r, customer_group=%r, anonymous_id=%r, country=%r, inventory_mode=%r, tax_mode=%r, tax_rounding_mode=%r, tax_calculation_mode=%r, line_items=%r, custom_line_items=%r, shipping_address=%r, billing_address=%r, shipping_method=%r, external_tax_rate_for_shipping_method=%r, custom=%r, locale=%r, delete_days_after_last_modification=%r, origin=%r, shipping_rate_input=%r, item_shipping_addresses=%r)"
            % (
                self.currency,
                self.customer_id,
                self.customer_email,
                self.customer_group,
                self.anonymous_id,
                self.country,
                self.inventory_mode,
                self.tax_mode,
                self.tax_rounding_mode,
                self.tax_calculation_mode,
                self.line_items,
                self.custom_line_items,
                self.shipping_address,
                self.billing_address,
                self.shipping_method,
                self.external_tax_rate_for_shipping_method,
                self.custom,
                self.locale,
                self.delete_days_after_last_modification,
                self.origin,
                self.shipping_rate_input,
                self.item_shipping_addresses,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CustomLineItem:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CustomLineItemSchema`."
    #: :class:`str`
    id: typing.Optional[str]
    #: :class:`commercetools.types.LocalizedString`
    name: typing.Optional["LocalizedString"]
    #: :class:`commercetools.types.TypedMoney`
    money: typing.Optional["TypedMoney"]
    #: Optional :class:`commercetools.types.TaxedItemPrice` `(Named` ``taxedPrice`` `in Commercetools)`
    taxed_price: typing.Optional["TaxedItemPrice"]
    #: :class:`commercetools.types.TypedMoney` `(Named` ``totalPrice`` `in Commercetools)`
    total_price: typing.Optional["TypedMoney"]
    #: :class:`str`
    slug: typing.Optional[str]
    #: :class:`int`
    quantity: typing.Optional[int]
    #: List of :class:`commercetools.types.ItemState`
    state: typing.Optional[typing.List["ItemState"]]
    #: Optional :class:`commercetools.types.TaxCategoryReference` `(Named` ``taxCategory`` `in Commercetools)`
    tax_category: typing.Optional["TaxCategoryReference"]
    #: Optional :class:`commercetools.types.TaxRate` `(Named` ``taxRate`` `in Commercetools)`
    tax_rate: typing.Optional["TaxRate"]
    #: List of :class:`commercetools.types.DiscountedLineItemPriceForQuantity` `(Named` ``discountedPricePerQuantity`` `in Commercetools)`
    discounted_price_per_quantity: typing.Optional[
        typing.List["DiscountedLineItemPriceForQuantity"]
    ]
    #: Optional :class:`commercetools.types.CustomFields`
    custom: typing.Optional["CustomFields"]
    #: Optional :class:`commercetools.types.ItemShippingDetails` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetails"]

    def __init__(
        self,
        *,
        id: typing.Optional[str] = None,
        name: typing.Optional["LocalizedString"] = None,
        money: typing.Optional["TypedMoney"] = None,
        taxed_price: typing.Optional["TaxedItemPrice"] = None,
        total_price: typing.Optional["TypedMoney"] = None,
        slug: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None,
        state: typing.Optional[typing.List["ItemState"]] = None,
        tax_category: typing.Optional["TaxCategoryReference"] = None,
        tax_rate: typing.Optional["TaxRate"] = None,
        discounted_price_per_quantity: typing.Optional[
            typing.List["DiscountedLineItemPriceForQuantity"]
        ] = None,
        custom: typing.Optional["CustomFields"] = None,
        shipping_details: typing.Optional["ItemShippingDetails"] = None
    ) -> None:
        self.id = id
        self.name = name
        self.money = money
        self.taxed_price = taxed_price
        self.total_price = total_price
        self.slug = slug
        self.quantity = quantity
        self.state = state
        self.tax_category = tax_category
        self.tax_rate = tax_rate
        self.discounted_price_per_quantity = discounted_price_per_quantity
        self.custom = custom
        self.shipping_details = shipping_details

    def __repr__(self) -> str:
        return (
            "CustomLineItem(id=%r, name=%r, money=%r, taxed_price=%r, total_price=%r, slug=%r, quantity=%r, state=%r, tax_category=%r, tax_rate=%r, discounted_price_per_quantity=%r, custom=%r, shipping_details=%r)"
            % (
                self.id,
                self.name,
                self.money,
                self.taxed_price,
                self.total_price,
                self.slug,
                self.quantity,
                self.state,
                self.tax_category,
                self.tax_rate,
                self.discounted_price_per_quantity,
                self.custom,
                self.shipping_details,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CustomLineItemDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CustomLineItemDraftSchema`."
    #: :class:`commercetools.types.LocalizedString`
    name: typing.Optional["LocalizedString"]
    #: :class:`int`
    quantity: typing.Optional[int]
    #: :class:`commercetools.types.Money`
    money: typing.Optional["Money"]
    #: :class:`str`
    slug: typing.Optional[str]
    #: Optional :class:`commercetools.types.TaxCategoryReference` `(Named` ``taxCategory`` `in Commercetools)`
    tax_category: typing.Optional["TaxCategoryReference"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]
    #: Optional :class:`commercetools.types.CustomFields`
    custom: typing.Optional["CustomFields"]
    #: Optional :class:`commercetools.types.ItemShippingDetailsDraft` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetailsDraft"]

    def __init__(
        self,
        *,
        name: typing.Optional["LocalizedString"] = None,
        quantity: typing.Optional[int] = None,
        money: typing.Optional["Money"] = None,
        slug: typing.Optional[str] = None,
        tax_category: typing.Optional["TaxCategoryReference"] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None,
        custom: typing.Optional["CustomFields"] = None,
        shipping_details: typing.Optional["ItemShippingDetailsDraft"] = None
    ) -> None:
        self.name = name
        self.quantity = quantity
        self.money = money
        self.slug = slug
        self.tax_category = tax_category
        self.external_tax_rate = external_tax_rate
        self.custom = custom
        self.shipping_details = shipping_details

    def __repr__(self) -> str:
        return (
            "CustomLineItemDraft(name=%r, quantity=%r, money=%r, slug=%r, tax_category=%r, external_tax_rate=%r, custom=%r, shipping_details=%r)"
            % (
                self.name,
                self.quantity,
                self.money,
                self.slug,
                self.tax_category,
                self.external_tax_rate,
                self.custom,
                self.shipping_details,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class DiscountCodeInfo:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.DiscountCodeInfoSchema`."
    #: :class:`commercetools.types.DiscountCodeReference` `(Named` ``discountCode`` `in Commercetools)`
    discount_code: typing.Optional["DiscountCodeReference"]
    #: :class:`commercetools.types.DiscountCodeState`
    state: typing.Optional["DiscountCodeState"]

    def __init__(
        self,
        *,
        discount_code: typing.Optional["DiscountCodeReference"] = None,
        state: typing.Optional["DiscountCodeState"] = None
    ) -> None:
        self.discount_code = discount_code
        self.state = state

    def __repr__(self) -> str:
        return "DiscountCodeInfo(discount_code=%r, state=%r)" % (
            self.discount_code,
            self.state,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class DiscountedLineItemPortion:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.DiscountedLineItemPortionSchema`."
    #: :class:`commercetools.types.CartDiscountReference`
    discount: typing.Optional["CartDiscountReference"]
    #: :class:`commercetools.types.Money` `(Named` ``discountedAmount`` `in Commercetools)`
    discounted_amount: typing.Optional["Money"]

    def __init__(
        self,
        *,
        discount: typing.Optional["CartDiscountReference"] = None,
        discounted_amount: typing.Optional["Money"] = None
    ) -> None:
        self.discount = discount
        self.discounted_amount = discounted_amount

    def __repr__(self) -> str:
        return "DiscountedLineItemPortion(discount=%r, discounted_amount=%r)" % (
            self.discount,
            self.discounted_amount,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class DiscountedLineItemPrice:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.DiscountedLineItemPriceSchema`."
    #: :class:`commercetools.types.TypedMoney`
    value: typing.Optional["TypedMoney"]
    #: List of :class:`commercetools.types.DiscountedLineItemPortion` `(Named` ``includedDiscounts`` `in Commercetools)`
    included_discounts: typing.Optional[typing.List["DiscountedLineItemPortion"]]

    def __init__(
        self,
        *,
        value: typing.Optional["TypedMoney"] = None,
        included_discounts: typing.Optional[
            typing.List["DiscountedLineItemPortion"]
        ] = None
    ) -> None:
        self.value = value
        self.included_discounts = included_discounts

    def __repr__(self) -> str:
        return "DiscountedLineItemPrice(value=%r, included_discounts=%r)" % (
            self.value,
            self.included_discounts,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class DiscountedLineItemPriceForQuantity:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.DiscountedLineItemPriceForQuantitySchema`."
    #: :class:`int`
    quantity: typing.Optional[int]
    #: :class:`commercetools.types.DiscountedLineItemPrice` `(Named` ``discountedPrice`` `in Commercetools)`
    discounted_price: typing.Optional["DiscountedLineItemPrice"]

    def __init__(
        self,
        *,
        quantity: typing.Optional[int] = None,
        discounted_price: typing.Optional["DiscountedLineItemPrice"] = None
    ) -> None:
        self.quantity = quantity
        self.discounted_price = discounted_price

    def __repr__(self) -> str:
        return (
            "DiscountedLineItemPriceForQuantity(quantity=%r, discounted_price=%r)"
            % (self.quantity, self.discounted_price)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ExternalLineItemTotalPrice:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ExternalLineItemTotalPriceSchema`."
    #: :class:`commercetools.types.Money`
    price: typing.Optional["Money"]
    #: :class:`commercetools.types.Money` `(Named` ``totalPrice`` `in Commercetools)`
    total_price: typing.Optional["Money"]

    def __init__(
        self,
        *,
        price: typing.Optional["Money"] = None,
        total_price: typing.Optional["Money"] = None
    ) -> None:
        self.price = price
        self.total_price = total_price

    def __repr__(self) -> str:
        return "ExternalLineItemTotalPrice(price=%r, total_price=%r)" % (
            self.price,
            self.total_price,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ExternalTaxAmountDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ExternalTaxAmountDraftSchema`."
    #: :class:`commercetools.types.Money` `(Named` ``totalGross`` `in Commercetools)`
    total_gross: typing.Optional["Money"]
    #: :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``taxRate`` `in Commercetools)`
    tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        total_gross: typing.Optional["Money"] = None,
        tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.total_gross = total_gross
        self.tax_rate = tax_rate

    def __repr__(self) -> str:
        return "ExternalTaxAmountDraft(total_gross=%r, tax_rate=%r)" % (
            self.total_gross,
            self.tax_rate,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ExternalTaxRateDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ExternalTaxRateDraftSchema`."
    #: :class:`str`
    name: typing.Optional[str]
    #: Optional :class:`int`
    amount: typing.Optional[int]
    #: :class:`str`
    country: typing.Optional[str]
    #: Optional :class:`str`
    state: typing.Optional[str]
    #: Optional list of :class:`commercetools.types.SubRate` `(Named` ``subRates`` `in Commercetools)`
    sub_rates: typing.Optional[typing.List["SubRate"]]
    #: Optional :class:`bool` `(Named` ``includedInPrice`` `in Commercetools)`
    included_in_price: typing.Optional[bool]

    def __init__(
        self,
        *,
        name: typing.Optional[str] = None,
        amount: typing.Optional[int] = None,
        country: typing.Optional[str] = None,
        state: typing.Optional[str] = None,
        sub_rates: typing.Optional[typing.List["SubRate"]] = None,
        included_in_price: typing.Optional[bool] = None
    ) -> None:
        self.name = name
        self.amount = amount
        self.country = country
        self.state = state
        self.sub_rates = sub_rates
        self.included_in_price = included_in_price

    def __repr__(self) -> str:
        return (
            "ExternalTaxRateDraft(name=%r, amount=%r, country=%r, state=%r, sub_rates=%r, included_in_price=%r)"
            % (
                self.name,
                self.amount,
                self.country,
                self.state,
                self.sub_rates,
                self.included_in_price,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ItemShippingDetails:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ItemShippingDetailsSchema`."
    #: List of :class:`commercetools.types.ItemShippingTarget`
    targets: typing.Optional[typing.List["ItemShippingTarget"]]
    #: :class:`bool`
    valid: typing.Optional[bool]

    def __init__(
        self,
        *,
        targets: typing.Optional[typing.List["ItemShippingTarget"]] = None,
        valid: typing.Optional[bool] = None
    ) -> None:
        self.targets = targets
        self.valid = valid

    def __repr__(self) -> str:
        return "ItemShippingDetails(targets=%r, valid=%r)" % (self.targets, self.valid)


@attr.s(auto_attribs=True, init=False, repr=False)
class ItemShippingDetailsDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ItemShippingDetailsDraftSchema`."
    #: List of :class:`commercetools.types.ItemShippingTarget`
    targets: typing.Optional[typing.List["ItemShippingTarget"]]

    def __init__(
        self, *, targets: typing.Optional[typing.List["ItemShippingTarget"]] = None
    ) -> None:
        self.targets = targets

    def __repr__(self) -> str:
        return "ItemShippingDetailsDraft(targets=%r)" % (self.targets,)


@attr.s(auto_attribs=True, init=False, repr=False)
class ItemShippingTarget:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ItemShippingTargetSchema`."
    #: :class:`str` `(Named` ``addressKey`` `in Commercetools)`
    address_key: typing.Optional[str]
    #: :class:`int`
    quantity: typing.Optional[int]

    def __init__(
        self,
        *,
        address_key: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None
    ) -> None:
        self.address_key = address_key
        self.quantity = quantity

    def __repr__(self) -> str:
        return "ItemShippingTarget(address_key=%r, quantity=%r)" % (
            self.address_key,
            self.quantity,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class LineItem:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.LineItemSchema`."
    #: :class:`str`
    id: typing.Optional[str]
    #: :class:`str` `(Named` ``productId`` `in Commercetools)`
    product_id: typing.Optional[str]
    #: :class:`commercetools.types.LocalizedString`
    name: typing.Optional["LocalizedString"]
    #: Optional :class:`commercetools.types.LocalizedString` `(Named` ``productSlug`` `in Commercetools)`
    product_slug: typing.Optional["LocalizedString"]
    #: :class:`commercetools.types.ProductTypeReference` `(Named` ``productType`` `in Commercetools)`
    product_type: typing.Optional["ProductTypeReference"]
    #: :class:`commercetools.types.ProductVariant`
    variant: typing.Optional["ProductVariant"]
    #: :class:`commercetools.types.Price`
    price: typing.Optional["Price"]
    #: Optional :class:`commercetools.types.TaxedItemPrice` `(Named` ``taxedPrice`` `in Commercetools)`
    taxed_price: typing.Optional["TaxedItemPrice"]
    #: :class:`commercetools.types.Money` `(Named` ``totalPrice`` `in Commercetools)`
    total_price: typing.Optional["Money"]
    #: :class:`int`
    quantity: typing.Optional[int]
    #: List of :class:`commercetools.types.ItemState`
    state: typing.Optional[typing.List["ItemState"]]
    #: Optional :class:`commercetools.types.TaxRate` `(Named` ``taxRate`` `in Commercetools)`
    tax_rate: typing.Optional["TaxRate"]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``supplyChannel`` `in Commercetools)`
    supply_channel: typing.Optional["ChannelReference"]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``distributionChannel`` `in Commercetools)`
    distribution_channel: typing.Optional["ChannelReference"]
    #: List of :class:`commercetools.types.DiscountedLineItemPriceForQuantity` `(Named` ``discountedPricePerQuantity`` `in Commercetools)`
    discounted_price_per_quantity: typing.Optional[
        typing.List["DiscountedLineItemPriceForQuantity"]
    ]
    #: :class:`commercetools.types.LineItemPriceMode` `(Named` ``priceMode`` `in Commercetools)`
    price_mode: typing.Optional["LineItemPriceMode"]
    #: :class:`commercetools.types.LineItemMode` `(Named` ``lineItemMode`` `in Commercetools)`
    line_item_mode: typing.Optional["LineItemMode"]
    #: Optional :class:`commercetools.types.CustomFields`
    custom: typing.Optional["CustomFields"]
    #: Optional :class:`commercetools.types.ItemShippingDetails` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetails"]

    def __init__(
        self,
        *,
        id: typing.Optional[str] = None,
        product_id: typing.Optional[str] = None,
        name: typing.Optional["LocalizedString"] = None,
        product_slug: typing.Optional["LocalizedString"] = None,
        product_type: typing.Optional["ProductTypeReference"] = None,
        variant: typing.Optional["ProductVariant"] = None,
        price: typing.Optional["Price"] = None,
        taxed_price: typing.Optional["TaxedItemPrice"] = None,
        total_price: typing.Optional["Money"] = None,
        quantity: typing.Optional[int] = None,
        state: typing.Optional[typing.List["ItemState"]] = None,
        tax_rate: typing.Optional["TaxRate"] = None,
        supply_channel: typing.Optional["ChannelReference"] = None,
        distribution_channel: typing.Optional["ChannelReference"] = None,
        discounted_price_per_quantity: typing.Optional[
            typing.List["DiscountedLineItemPriceForQuantity"]
        ] = None,
        price_mode: typing.Optional["LineItemPriceMode"] = None,
        line_item_mode: typing.Optional["LineItemMode"] = None,
        custom: typing.Optional["CustomFields"] = None,
        shipping_details: typing.Optional["ItemShippingDetails"] = None
    ) -> None:
        self.id = id
        self.product_id = product_id
        self.name = name
        self.product_slug = product_slug
        self.product_type = product_type
        self.variant = variant
        self.price = price
        self.taxed_price = taxed_price
        self.total_price = total_price
        self.quantity = quantity
        self.state = state
        self.tax_rate = tax_rate
        self.supply_channel = supply_channel
        self.distribution_channel = distribution_channel
        self.discounted_price_per_quantity = discounted_price_per_quantity
        self.price_mode = price_mode
        self.line_item_mode = line_item_mode
        self.custom = custom
        self.shipping_details = shipping_details

    def __repr__(self) -> str:
        return (
            "LineItem(id=%r, product_id=%r, name=%r, product_slug=%r, product_type=%r, variant=%r, price=%r, taxed_price=%r, total_price=%r, quantity=%r, state=%r, tax_rate=%r, supply_channel=%r, distribution_channel=%r, discounted_price_per_quantity=%r, price_mode=%r, line_item_mode=%r, custom=%r, shipping_details=%r)"
            % (
                self.id,
                self.product_id,
                self.name,
                self.product_slug,
                self.product_type,
                self.variant,
                self.price,
                self.taxed_price,
                self.total_price,
                self.quantity,
                self.state,
                self.tax_rate,
                self.supply_channel,
                self.distribution_channel,
                self.discounted_price_per_quantity,
                self.price_mode,
                self.line_item_mode,
                self.custom,
                self.shipping_details,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class LineItemDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.LineItemDraftSchema`."
    #: Optional :class:`str` `(Named` ``productId`` `in Commercetools)`
    product_id: typing.Optional[str]
    #: Optional :class:`int` `(Named` ``variantId`` `in Commercetools)`
    variant_id: typing.Optional[int]
    #: Optional :class:`str`
    sku: typing.Optional[str]
    #: Optional :class:`int`
    quantity: typing.Optional[int]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``supplyChannel`` `in Commercetools)`
    supply_channel: typing.Optional["ChannelReference"]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``distributionChannel`` `in Commercetools)`
    distribution_channel: typing.Optional["ChannelReference"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]
    #: Optional :class:`commercetools.types.CustomFieldsDraft`
    custom: typing.Optional["CustomFieldsDraft"]
    #: Optional :class:`commercetools.types.Money` `(Named` ``externalPrice`` `in Commercetools)`
    external_price: typing.Optional["Money"]
    #: Optional :class:`commercetools.types.ExternalLineItemTotalPrice` `(Named` ``externalTotalPrice`` `in Commercetools)`
    external_total_price: typing.Optional["ExternalLineItemTotalPrice"]
    #: Optional :class:`commercetools.types.ItemShippingDetailsDraft` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetailsDraft"]

    def __init__(
        self,
        *,
        product_id: typing.Optional[str] = None,
        variant_id: typing.Optional[int] = None,
        sku: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None,
        supply_channel: typing.Optional["ChannelReference"] = None,
        distribution_channel: typing.Optional["ChannelReference"] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None,
        custom: typing.Optional["CustomFieldsDraft"] = None,
        external_price: typing.Optional["Money"] = None,
        external_total_price: typing.Optional["ExternalLineItemTotalPrice"] = None,
        shipping_details: typing.Optional["ItemShippingDetailsDraft"] = None
    ) -> None:
        self.product_id = product_id
        self.variant_id = variant_id
        self.sku = sku
        self.quantity = quantity
        self.supply_channel = supply_channel
        self.distribution_channel = distribution_channel
        self.external_tax_rate = external_tax_rate
        self.custom = custom
        self.external_price = external_price
        self.external_total_price = external_total_price
        self.shipping_details = shipping_details

    def __repr__(self) -> str:
        return (
            "LineItemDraft(product_id=%r, variant_id=%r, sku=%r, quantity=%r, supply_channel=%r, distribution_channel=%r, external_tax_rate=%r, custom=%r, external_price=%r, external_total_price=%r, shipping_details=%r)"
            % (
                self.product_id,
                self.variant_id,
                self.sku,
                self.quantity,
                self.supply_channel,
                self.distribution_channel,
                self.external_tax_rate,
                self.custom,
                self.external_price,
                self.external_total_price,
                self.shipping_details,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ReplicaCartDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ReplicaCartDraftSchema`."
    #: :class:`commercetools.types.Reference`
    reference: typing.Optional["Reference"]

    def __init__(self, *, reference: typing.Optional["Reference"] = None) -> None:
        self.reference = reference

    def __repr__(self) -> str:
        return "ReplicaCartDraft(reference=%r)" % (self.reference,)


@attr.s(auto_attribs=True, init=False, repr=False)
class ShippingInfo:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ShippingInfoSchema`."
    #: :class:`str` `(Named` ``shippingMethodName`` `in Commercetools)`
    shipping_method_name: typing.Optional[str]
    #: :class:`commercetools.types.TypedMoney`
    price: typing.Optional["TypedMoney"]
    #: :class:`commercetools.types.ShippingRate` `(Named` ``shippingRate`` `in Commercetools)`
    shipping_rate: typing.Optional["ShippingRate"]
    #: Optional :class:`commercetools.types.TaxedItemPrice` `(Named` ``taxedPrice`` `in Commercetools)`
    taxed_price: typing.Optional["TaxedItemPrice"]
    #: Optional :class:`commercetools.types.TaxRate` `(Named` ``taxRate`` `in Commercetools)`
    tax_rate: typing.Optional["TaxRate"]
    #: Optional :class:`commercetools.types.TaxCategoryReference` `(Named` ``taxCategory`` `in Commercetools)`
    tax_category: typing.Optional["TaxCategoryReference"]
    #: Optional :class:`commercetools.types.ShippingMethodReference` `(Named` ``shippingMethod`` `in Commercetools)`
    shipping_method: typing.Optional["ShippingMethodReference"]
    #: Optional list of :class:`commercetools.types.Delivery`
    deliveries: typing.Optional[typing.List["Delivery"]]
    #: Optional :class:`commercetools.types.DiscountedLineItemPrice` `(Named` ``discountedPrice`` `in Commercetools)`
    discounted_price: typing.Optional["DiscountedLineItemPrice"]
    #: :class:`commercetools.types.ShippingMethodState` `(Named` ``shippingMethodState`` `in Commercetools)`
    shipping_method_state: typing.Optional["ShippingMethodState"]

    def __init__(
        self,
        *,
        shipping_method_name: typing.Optional[str] = None,
        price: typing.Optional["TypedMoney"] = None,
        shipping_rate: typing.Optional["ShippingRate"] = None,
        taxed_price: typing.Optional["TaxedItemPrice"] = None,
        tax_rate: typing.Optional["TaxRate"] = None,
        tax_category: typing.Optional["TaxCategoryReference"] = None,
        shipping_method: typing.Optional["ShippingMethodReference"] = None,
        deliveries: typing.Optional[typing.List["Delivery"]] = None,
        discounted_price: typing.Optional["DiscountedLineItemPrice"] = None,
        shipping_method_state: typing.Optional["ShippingMethodState"] = None
    ) -> None:
        self.shipping_method_name = shipping_method_name
        self.price = price
        self.shipping_rate = shipping_rate
        self.taxed_price = taxed_price
        self.tax_rate = tax_rate
        self.tax_category = tax_category
        self.shipping_method = shipping_method
        self.deliveries = deliveries
        self.discounted_price = discounted_price
        self.shipping_method_state = shipping_method_state

    def __repr__(self) -> str:
        return (
            "ShippingInfo(shipping_method_name=%r, price=%r, shipping_rate=%r, taxed_price=%r, tax_rate=%r, tax_category=%r, shipping_method=%r, deliveries=%r, discounted_price=%r, shipping_method_state=%r)"
            % (
                self.shipping_method_name,
                self.price,
                self.shipping_rate,
                self.taxed_price,
                self.tax_rate,
                self.tax_category,
                self.shipping_method,
                self.deliveries,
                self.discounted_price,
                self.shipping_method_state,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ShippingRateInput:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ShippingRateInputSchema`."
    #: :class:`str`
    type: typing.Optional[str]

    def __init__(self, *, type: typing.Optional[str] = None) -> None:
        self.type = type

    def __repr__(self) -> str:
        return "ShippingRateInput(type=%r)" % (self.type,)


@attr.s(auto_attribs=True, init=False, repr=False)
class ShippingRateInputDraft:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ShippingRateInputDraftSchema`."
    #: :class:`str`
    type: typing.Optional[str]

    def __init__(self, *, type: typing.Optional[str] = None) -> None:
        self.type = type

    def __repr__(self) -> str:
        return "ShippingRateInputDraft(type=%r)" % (self.type,)


@attr.s(auto_attribs=True, init=False, repr=False)
class TaxPortion:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.TaxPortionSchema`."
    #: Optional :class:`str`
    name: typing.Optional[str]
    #: :class:`float`
    rate: typing.Optional[float]
    #: :class:`commercetools.types.Money`
    amount: typing.Optional["Money"]

    def __init__(
        self,
        *,
        name: typing.Optional[str] = None,
        rate: typing.Optional[float] = None,
        amount: typing.Optional["Money"] = None
    ) -> None:
        self.name = name
        self.rate = rate
        self.amount = amount

    def __repr__(self) -> str:
        return "TaxPortion(name=%r, rate=%r, amount=%r)" % (
            self.name,
            self.rate,
            self.amount,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class TaxedItemPrice:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.TaxedItemPriceSchema`."
    #: :class:`commercetools.types.TypedMoney` `(Named` ``totalNet`` `in Commercetools)`
    total_net: typing.Optional["TypedMoney"]
    #: :class:`commercetools.types.TypedMoney` `(Named` ``totalGross`` `in Commercetools)`
    total_gross: typing.Optional["TypedMoney"]

    def __init__(
        self,
        *,
        total_net: typing.Optional["TypedMoney"] = None,
        total_gross: typing.Optional["TypedMoney"] = None
    ) -> None:
        self.total_net = total_net
        self.total_gross = total_gross

    def __repr__(self) -> str:
        return "TaxedItemPrice(total_net=%r, total_gross=%r)" % (
            self.total_net,
            self.total_gross,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class TaxedPrice:
    "Corresponding marshmallow schema is :class:`commercetools.schemas.TaxedPriceSchema`."
    #: :class:`commercetools.types.Money` `(Named` ``totalNet`` `in Commercetools)`
    total_net: typing.Optional["Money"]
    #: :class:`commercetools.types.Money` `(Named` ``totalGross`` `in Commercetools)`
    total_gross: typing.Optional["Money"]
    #: List of :class:`commercetools.types.TaxPortion` `(Named` ``taxPortions`` `in Commercetools)`
    tax_portions: typing.Optional[typing.List["TaxPortion"]]

    def __init__(
        self,
        *,
        total_net: typing.Optional["Money"] = None,
        total_gross: typing.Optional["Money"] = None,
        tax_portions: typing.Optional[typing.List["TaxPortion"]] = None
    ) -> None:
        self.total_net = total_net
        self.total_gross = total_gross
        self.tax_portions = tax_portions

    def __repr__(self) -> str:
        return "TaxedPrice(total_net=%r, total_gross=%r, tax_portions=%r)" % (
            self.total_net,
            self.total_gross,
            self.tax_portions,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class Cart(Resource):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSchema`."
    #: Optional :class:`str` `(Named` ``customerId`` `in Commercetools)`
    customer_id: typing.Optional[str]
    #: Optional :class:`str` `(Named` ``customerEmail`` `in Commercetools)`
    customer_email: typing.Optional[str]
    #: Optional :class:`str` `(Named` ``anonymousId`` `in Commercetools)`
    anonymous_id: typing.Optional[str]
    #: List of :class:`commercetools.types.LineItem` `(Named` ``lineItems`` `in Commercetools)`
    line_items: typing.Optional[typing.List["LineItem"]]
    #: List of :class:`commercetools.types.CustomLineItem` `(Named` ``customLineItems`` `in Commercetools)`
    custom_line_items: typing.Optional[typing.List["CustomLineItem"]]
    #: :class:`commercetools.types.TypedMoney` `(Named` ``totalPrice`` `in Commercetools)`
    total_price: typing.Optional["TypedMoney"]
    #: Optional :class:`commercetools.types.TaxedPrice` `(Named` ``taxedPrice`` `in Commercetools)`
    taxed_price: typing.Optional["TaxedPrice"]
    #: :class:`commercetools.types.CartState` `(Named` ``cartState`` `in Commercetools)`
    cart_state: typing.Optional["CartState"]
    #: Optional :class:`commercetools.types.Address` `(Named` ``shippingAddress`` `in Commercetools)`
    shipping_address: typing.Optional["Address"]
    #: Optional :class:`commercetools.types.Address` `(Named` ``billingAddress`` `in Commercetools)`
    billing_address: typing.Optional["Address"]
    #: Optional :class:`commercetools.types.InventoryMode` `(Named` ``inventoryMode`` `in Commercetools)`
    inventory_mode: typing.Optional["InventoryMode"]
    #: :class:`commercetools.types.TaxMode` `(Named` ``taxMode`` `in Commercetools)`
    tax_mode: typing.Optional["TaxMode"]
    #: :class:`commercetools.types.RoundingMode` `(Named` ``taxRoundingMode`` `in Commercetools)`
    tax_rounding_mode: typing.Optional["RoundingMode"]
    #: :class:`commercetools.types.TaxCalculationMode` `(Named` ``taxCalculationMode`` `in Commercetools)`
    tax_calculation_mode: typing.Optional["TaxCalculationMode"]
    #: Optional :class:`commercetools.types.CustomerGroupReference` `(Named` ``customerGroup`` `in Commercetools)`
    customer_group: typing.Optional["CustomerGroupReference"]
    #: Optional :class:`str`
    country: typing.Optional["str"]
    #: Optional :class:`commercetools.types.ShippingInfo` `(Named` ``shippingInfo`` `in Commercetools)`
    shipping_info: typing.Optional["ShippingInfo"]
    #: Optional list of :class:`commercetools.types.DiscountCodeInfo` `(Named` ``discountCodes`` `in Commercetools)`
    discount_codes: typing.Optional[typing.List["DiscountCodeInfo"]]
    #: Optional :class:`commercetools.types.CustomFields`
    custom: typing.Optional["CustomFields"]
    #: Optional :class:`commercetools.types.PaymentInfo` `(Named` ``paymentInfo`` `in Commercetools)`
    payment_info: typing.Optional["PaymentInfo"]
    #: Optional :class:`str`
    locale: typing.Optional[str]
    #: Optional :class:`int` `(Named` ``deleteDaysAfterLastModification`` `in Commercetools)`
    delete_days_after_last_modification: typing.Optional[int]
    #: List of :class:`commercetools.types.CartDiscountReference` `(Named` ``refusedGifts`` `in Commercetools)`
    refused_gifts: typing.Optional[typing.List["CartDiscountReference"]]
    #: :class:`commercetools.types.CartOrigin`
    origin: typing.Optional["CartOrigin"]
    #: Optional :class:`commercetools.types.ShippingRateInput` `(Named` ``shippingRateInput`` `in Commercetools)`
    shipping_rate_input: typing.Optional["ShippingRateInput"]
    #: Optional list of :class:`commercetools.types.Address` `(Named` ``itemShippingAddresses`` `in Commercetools)`
    item_shipping_addresses: typing.Optional[typing.List["Address"]]

    def __init__(
        self,
        *,
        id: typing.Optional[str] = None,
        version: typing.Optional[int] = None,
        created_at: typing.Optional[datetime.datetime] = None,
        last_modified_at: typing.Optional[datetime.datetime] = None,
        customer_id: typing.Optional[str] = None,
        customer_email: typing.Optional[str] = None,
        anonymous_id: typing.Optional[str] = None,
        line_items: typing.Optional[typing.List["LineItem"]] = None,
        custom_line_items: typing.Optional[typing.List["CustomLineItem"]] = None,
        total_price: typing.Optional["TypedMoney"] = None,
        taxed_price: typing.Optional["TaxedPrice"] = None,
        cart_state: typing.Optional["CartState"] = None,
        shipping_address: typing.Optional["Address"] = None,
        billing_address: typing.Optional["Address"] = None,
        inventory_mode: typing.Optional["InventoryMode"] = None,
        tax_mode: typing.Optional["TaxMode"] = None,
        tax_rounding_mode: typing.Optional["RoundingMode"] = None,
        tax_calculation_mode: typing.Optional["TaxCalculationMode"] = None,
        customer_group: typing.Optional["CustomerGroupReference"] = None,
        country: typing.Optional["str"] = None,
        shipping_info: typing.Optional["ShippingInfo"] = None,
        discount_codes: typing.Optional[typing.List["DiscountCodeInfo"]] = None,
        custom: typing.Optional["CustomFields"] = None,
        payment_info: typing.Optional["PaymentInfo"] = None,
        locale: typing.Optional[str] = None,
        delete_days_after_last_modification: typing.Optional[int] = None,
        refused_gifts: typing.Optional[typing.List["CartDiscountReference"]] = None,
        origin: typing.Optional["CartOrigin"] = None,
        shipping_rate_input: typing.Optional["ShippingRateInput"] = None,
        item_shipping_addresses: typing.Optional[typing.List["Address"]] = None
    ) -> None:
        self.customer_id = customer_id
        self.customer_email = customer_email
        self.anonymous_id = anonymous_id
        self.line_items = line_items
        self.custom_line_items = custom_line_items
        self.total_price = total_price
        self.taxed_price = taxed_price
        self.cart_state = cart_state
        self.shipping_address = shipping_address
        self.billing_address = billing_address
        self.inventory_mode = inventory_mode
        self.tax_mode = tax_mode
        self.tax_rounding_mode = tax_rounding_mode
        self.tax_calculation_mode = tax_calculation_mode
        self.customer_group = customer_group
        self.country = country
        self.shipping_info = shipping_info
        self.discount_codes = discount_codes
        self.custom = custom
        self.payment_info = payment_info
        self.locale = locale
        self.delete_days_after_last_modification = delete_days_after_last_modification
        self.refused_gifts = refused_gifts
        self.origin = origin
        self.shipping_rate_input = shipping_rate_input
        self.item_shipping_addresses = item_shipping_addresses
        super().__init__(
            id=id,
            version=version,
            created_at=created_at,
            last_modified_at=last_modified_at,
        )

    def __repr__(self) -> str:
        return (
            "Cart(id=%r, version=%r, created_at=%r, last_modified_at=%r, customer_id=%r, customer_email=%r, anonymous_id=%r, line_items=%r, custom_line_items=%r, total_price=%r, taxed_price=%r, cart_state=%r, shipping_address=%r, billing_address=%r, inventory_mode=%r, tax_mode=%r, tax_rounding_mode=%r, tax_calculation_mode=%r, customer_group=%r, country=%r, shipping_info=%r, discount_codes=%r, custom=%r, payment_info=%r, locale=%r, delete_days_after_last_modification=%r, refused_gifts=%r, origin=%r, shipping_rate_input=%r, item_shipping_addresses=%r)"
            % (
                self.id,
                self.version,
                self.created_at,
                self.last_modified_at,
                self.customer_id,
                self.customer_email,
                self.anonymous_id,
                self.line_items,
                self.custom_line_items,
                self.total_price,
                self.taxed_price,
                self.cart_state,
                self.shipping_address,
                self.billing_address,
                self.inventory_mode,
                self.tax_mode,
                self.tax_rounding_mode,
                self.tax_calculation_mode,
                self.customer_group,
                self.country,
                self.shipping_info,
                self.discount_codes,
                self.custom,
                self.payment_info,
                self.locale,
                self.delete_days_after_last_modification,
                self.refused_gifts,
                self.origin,
                self.shipping_rate_input,
                self.item_shipping_addresses,
            )
        )


class CartOrigin(enum.Enum):
    CUSTOMER = "Customer"
    MERCHANT = "Merchant"


@attr.s(auto_attribs=True, init=False, repr=False)
class CartPagedQueryResponse(PagedQueryResponse):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartPagedQueryResponseSchema`."
    #: List of :class:`commercetools.types.Cart`
    results: typing.Optional[typing.Sequence["Cart"]]

    def __init__(
        self,
        *,
        count: typing.Optional[int] = None,
        total: typing.Optional[int] = None,
        offset: typing.Optional[int] = None,
        results: typing.Optional[typing.Sequence["Cart"]] = None
    ) -> None:
        self.results = results
        super().__init__(count=count, total=total, offset=offset, results=results)

    def __repr__(self) -> str:
        return "CartPagedQueryResponse(count=%r, total=%r, offset=%r, results=%r)" % (
            self.count,
            self.total,
            self.offset,
            self.results,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartReference(Reference):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartReferenceSchema`."
    #: Optional :class:`commercetools.types.Cart`
    obj: typing.Optional["Cart"]

    def __init__(
        self,
        *,
        type_id: typing.Optional["ReferenceTypeId"] = None,
        id: typing.Optional[str] = None,
        key: typing.Optional[str] = None,
        obj: typing.Optional["Cart"] = None
    ) -> None:
        self.obj = obj
        super().__init__(type_id=ReferenceTypeId.CART, id=id, key=key)

    def __repr__(self) -> str:
        return "CartReference(type_id=%r, id=%r, key=%r, obj=%r)" % (
            self.type_id,
            self.id,
            self.key,
            self.obj,
        )


class CartState(enum.Enum):
    ACTIVE = "Active"
    MERGED = "Merged"
    ORDERED = "Ordered"


@attr.s(auto_attribs=True, init=False, repr=False)
class CartUpdate(Update):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartUpdateSchema`."
    #: :class:`list`
    actions: typing.Optional[list]

    def __init__(
        self,
        *,
        version: typing.Optional[int] = None,
        actions: typing.Optional[list] = None
    ) -> None:
        self.actions = actions
        super().__init__(version=version, actions=actions)

    def __repr__(self) -> str:
        return "CartUpdate(version=%r, actions=%r)" % (self.version, self.actions)


@attr.s(auto_attribs=True, init=False, repr=False)
class CartUpdateAction(UpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartUpdateActionSchema`."

    def __init__(self, *, action: typing.Optional[str] = None) -> None:
        super().__init__(action=action)

    def __repr__(self) -> str:
        return "CartUpdateAction(action=%r)" % (self.action,)


@attr.s(auto_attribs=True, init=False, repr=False)
class ClassificationShippingRateInput(ShippingRateInput):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ClassificationShippingRateInputSchema`."
    #: :class:`str`
    key: typing.Optional[str]
    #: :class:`commercetools.types.LocalizedString`
    label: typing.Optional["LocalizedString"]

    def __init__(
        self,
        *,
        type: typing.Optional[str] = None,
        key: typing.Optional[str] = None,
        label: typing.Optional["LocalizedString"] = None
    ) -> None:
        self.key = key
        self.label = label
        super().__init__(type="Classification")

    def __repr__(self) -> str:
        return "ClassificationShippingRateInput(type=%r, key=%r, label=%r)" % (
            self.type,
            self.key,
            self.label,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class ClassificationShippingRateInputDraft(ShippingRateInputDraft):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ClassificationShippingRateInputDraftSchema`."
    #: :class:`str`
    key: typing.Optional[str]

    def __init__(
        self, *, type: typing.Optional[str] = None, key: typing.Optional[str] = None
    ) -> None:
        self.key = key
        super().__init__(type="Classification")

    def __repr__(self) -> str:
        return "ClassificationShippingRateInputDraft(type=%r, key=%r)" % (
            self.type,
            self.key,
        )


class DiscountCodeState(enum.Enum):
    NOT_ACTIVE = "NotActive"
    DOES_NOT_MATCH_CART = "DoesNotMatchCart"
    MATCHES_CART = "MatchesCart"
    MAX_APPLICATION_REACHED = "MaxApplicationReached"


class InventoryMode(enum.Enum):
    TRACK_ONLY = "TrackOnly"
    RESERVE_ON_ORDER = "ReserveOnOrder"
    NONE = "None"


class LineItemMode(enum.Enum):
    STANDARD = "Standard"
    GIFT_LINE_ITEM = "GiftLineItem"


class LineItemPriceMode(enum.Enum):
    PLATFORM = "Platform"
    EXTERNAL_TOTAL = "ExternalTotal"
    EXTERNAL_PRICE = "ExternalPrice"


class ProductPublishScope(enum.Enum):
    ALL = "All"
    PRICES = "Prices"


class RoundingMode(enum.Enum):
    HALF_EVEN = "HalfEven"
    HALF_UP = "HalfUp"
    HALF_DOWN = "HalfDown"


@attr.s(auto_attribs=True, init=False, repr=False)
class ScoreShippingRateInput(ShippingRateInput):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ScoreShippingRateInputSchema`."
    #: :class:`int`
    score: typing.Optional[int]

    def __init__(
        self, *, type: typing.Optional[str] = None, score: typing.Optional[int] = None
    ) -> None:
        self.score = score
        super().__init__(type="Score")

    def __repr__(self) -> str:
        return "ScoreShippingRateInput(type=%r, score=%r)" % (self.type, self.score)


@attr.s(auto_attribs=True, init=False, repr=False)
class ScoreShippingRateInputDraft(ShippingRateInputDraft):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.ScoreShippingRateInputDraftSchema`."
    #: :class:`int`
    score: typing.Optional[int]

    def __init__(
        self, *, type: typing.Optional[str] = None, score: typing.Optional[int] = None
    ) -> None:
        self.score = score
        super().__init__(type="Score")

    def __repr__(self) -> str:
        return "ScoreShippingRateInputDraft(type=%r, score=%r)" % (
            self.type,
            self.score,
        )


class ShippingMethodState(enum.Enum):
    DOES_NOT_MATCH_CART = "DoesNotMatchCart"
    MATCHES_CART = "MatchesCart"


class TaxCalculationMode(enum.Enum):
    LINE_ITEM_LEVEL = "LineItemLevel"
    UNIT_PRICE_LEVEL = "UnitPriceLevel"


class TaxMode(enum.Enum):
    PLATFORM = "Platform"
    EXTERNAL = "External"
    EXTERNAL_AMOUNT = "ExternalAmount"
    DISABLED = "Disabled"


@attr.s(auto_attribs=True, init=False, repr=False)
class CartAddCustomLineItemAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartAddCustomLineItemActionSchema`."
    #: :class:`commercetools.types.Money`
    money: typing.Optional["Money"]
    #: :class:`commercetools.types.LocalizedString`
    name: typing.Optional["LocalizedString"]
    #: :class:`int`
    quantity: typing.Optional[int]
    #: :class:`str`
    slug: typing.Optional[str]
    #: Optional :class:`commercetools.types.TaxCategoryReference` `(Named` ``taxCategory`` `in Commercetools)`
    tax_category: typing.Optional["TaxCategoryReference"]
    #: Optional :class:`commercetools.types.CustomFieldsDraft`
    custom: typing.Optional["CustomFieldsDraft"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        money: typing.Optional["Money"] = None,
        name: typing.Optional["LocalizedString"] = None,
        quantity: typing.Optional[int] = None,
        slug: typing.Optional[str] = None,
        tax_category: typing.Optional["TaxCategoryReference"] = None,
        custom: typing.Optional["CustomFieldsDraft"] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.money = money
        self.name = name
        self.quantity = quantity
        self.slug = slug
        self.tax_category = tax_category
        self.custom = custom
        self.external_tax_rate = external_tax_rate
        super().__init__(action="addCustomLineItem")

    def __repr__(self) -> str:
        return (
            "CartAddCustomLineItemAction(action=%r, money=%r, name=%r, quantity=%r, slug=%r, tax_category=%r, custom=%r, external_tax_rate=%r)"
            % (
                self.action,
                self.money,
                self.name,
                self.quantity,
                self.slug,
                self.tax_category,
                self.custom,
                self.external_tax_rate,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartAddDiscountCodeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartAddDiscountCodeActionSchema`."
    #: :class:`str`
    code: typing.Optional[str]

    def __init__(
        self, *, action: typing.Optional[str] = None, code: typing.Optional[str] = None
    ) -> None:
        self.code = code
        super().__init__(action="addDiscountCode")

    def __repr__(self) -> str:
        return "CartAddDiscountCodeAction(action=%r, code=%r)" % (
            self.action,
            self.code,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartAddItemShippingAddressAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartAddItemShippingAddressActionSchema`."
    #: :class:`commercetools.types.Address`
    address: typing.Optional["Address"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        address: typing.Optional["Address"] = None
    ) -> None:
        self.address = address
        super().__init__(action="addItemShippingAddress")

    def __repr__(self) -> str:
        return "CartAddItemShippingAddressAction(action=%r, address=%r)" % (
            self.action,
            self.address,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartAddLineItemAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartAddLineItemActionSchema`."
    #: Optional :class:`commercetools.types.CustomFieldsDraft`
    custom: typing.Optional["CustomFieldsDraft"]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``distributionChannel`` `in Commercetools)`
    distribution_channel: typing.Optional["ChannelReference"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]
    #: Optional :class:`str` `(Named` ``productId`` `in Commercetools)`
    product_id: typing.Optional[str]
    #: Optional :class:`int` `(Named` ``variantId`` `in Commercetools)`
    variant_id: typing.Optional[int]
    #: Optional :class:`str`
    sku: typing.Optional[str]
    #: Optional :class:`int`
    quantity: typing.Optional[int]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``supplyChannel`` `in Commercetools)`
    supply_channel: typing.Optional["ChannelReference"]
    #: Optional :class:`commercetools.types.Money` `(Named` ``externalPrice`` `in Commercetools)`
    external_price: typing.Optional["Money"]
    #: Optional :class:`commercetools.types.ExternalLineItemTotalPrice` `(Named` ``externalTotalPrice`` `in Commercetools)`
    external_total_price: typing.Optional["ExternalLineItemTotalPrice"]
    #: Optional :class:`commercetools.types.ItemShippingDetailsDraft` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetailsDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom: typing.Optional["CustomFieldsDraft"] = None,
        distribution_channel: typing.Optional["ChannelReference"] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None,
        product_id: typing.Optional[str] = None,
        variant_id: typing.Optional[int] = None,
        sku: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None,
        supply_channel: typing.Optional["ChannelReference"] = None,
        external_price: typing.Optional["Money"] = None,
        external_total_price: typing.Optional["ExternalLineItemTotalPrice"] = None,
        shipping_details: typing.Optional["ItemShippingDetailsDraft"] = None
    ) -> None:
        self.custom = custom
        self.distribution_channel = distribution_channel
        self.external_tax_rate = external_tax_rate
        self.product_id = product_id
        self.variant_id = variant_id
        self.sku = sku
        self.quantity = quantity
        self.supply_channel = supply_channel
        self.external_price = external_price
        self.external_total_price = external_total_price
        self.shipping_details = shipping_details
        super().__init__(action="addLineItem")

    def __repr__(self) -> str:
        return (
            "CartAddLineItemAction(action=%r, custom=%r, distribution_channel=%r, external_tax_rate=%r, product_id=%r, variant_id=%r, sku=%r, quantity=%r, supply_channel=%r, external_price=%r, external_total_price=%r, shipping_details=%r)"
            % (
                self.action,
                self.custom,
                self.distribution_channel,
                self.external_tax_rate,
                self.product_id,
                self.variant_id,
                self.sku,
                self.quantity,
                self.supply_channel,
                self.external_price,
                self.external_total_price,
                self.shipping_details,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartAddPaymentAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartAddPaymentActionSchema`."
    #: :class:`commercetools.types.PaymentReference`
    payment: typing.Optional["PaymentReference"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        payment: typing.Optional["PaymentReference"] = None
    ) -> None:
        self.payment = payment
        super().__init__(action="addPayment")

    def __repr__(self) -> str:
        return "CartAddPaymentAction(action=%r, payment=%r)" % (
            self.action,
            self.payment,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartAddShoppingListAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartAddShoppingListActionSchema`."
    #: :class:`commercetools.types.ShoppingListReference` `(Named` ``shoppingList`` `in Commercetools)`
    shopping_list: typing.Optional["ShoppingListReference"]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``supplyChannel`` `in Commercetools)`
    supply_channel: typing.Optional["ChannelReference"]
    #: Optional :class:`commercetools.types.ChannelReference` `(Named` ``distributionChannel`` `in Commercetools)`
    distribution_channel: typing.Optional["ChannelReference"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        shopping_list: typing.Optional["ShoppingListReference"] = None,
        supply_channel: typing.Optional["ChannelReference"] = None,
        distribution_channel: typing.Optional["ChannelReference"] = None
    ) -> None:
        self.shopping_list = shopping_list
        self.supply_channel = supply_channel
        self.distribution_channel = distribution_channel
        super().__init__(action="addShoppingList")

    def __repr__(self) -> str:
        return (
            "CartAddShoppingListAction(action=%r, shopping_list=%r, supply_channel=%r, distribution_channel=%r)"
            % (
                self.action,
                self.shopping_list,
                self.supply_channel,
                self.distribution_channel,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: List of :class:`commercetools.types.ItemShippingTarget` `(Named` ``targetsDelta`` `in Commercetools)`
    targets_delta: typing.Optional[typing.List["ItemShippingTarget"]]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        targets_delta: typing.Optional[typing.List["ItemShippingTarget"]] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.targets_delta = targets_delta
        super().__init__(action="applyDeltaToCustomLineItemShippingDetailsTargets")

    def __repr__(self) -> str:
        return (
            "CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction(action=%r, custom_line_item_id=%r, targets_delta=%r)"
            % (self.action, self.custom_line_item_id, self.targets_delta)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartApplyDeltaToLineItemShippingDetailsTargetsAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartApplyDeltaToLineItemShippingDetailsTargetsActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: List of :class:`commercetools.types.ItemShippingTarget` `(Named` ``targetsDelta`` `in Commercetools)`
    targets_delta: typing.Optional[typing.List["ItemShippingTarget"]]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        targets_delta: typing.Optional[typing.List["ItemShippingTarget"]] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.targets_delta = targets_delta
        super().__init__(action="applyDeltaToLineItemShippingDetailsTargets")

    def __repr__(self) -> str:
        return (
            "CartApplyDeltaToLineItemShippingDetailsTargetsAction(action=%r, line_item_id=%r, targets_delta=%r)"
            % (self.action, self.line_item_id, self.targets_delta)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartChangeCustomLineItemMoneyAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartChangeCustomLineItemMoneyActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: :class:`commercetools.types.Money`
    money: typing.Optional["Money"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        money: typing.Optional["Money"] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.money = money
        super().__init__(action="changeCustomLineItemMoney")

    def __repr__(self) -> str:
        return (
            "CartChangeCustomLineItemMoneyAction(action=%r, custom_line_item_id=%r, money=%r)"
            % (self.action, self.custom_line_item_id, self.money)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartChangeCustomLineItemQuantityAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartChangeCustomLineItemQuantityActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: :class:`int`
    quantity: typing.Optional[int]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.quantity = quantity
        super().__init__(action="changeCustomLineItemQuantity")

    def __repr__(self) -> str:
        return (
            "CartChangeCustomLineItemQuantityAction(action=%r, custom_line_item_id=%r, quantity=%r)"
            % (self.action, self.custom_line_item_id, self.quantity)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartChangeLineItemQuantityAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartChangeLineItemQuantityActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: :class:`int`
    quantity: typing.Optional[int]
    #: Optional :class:`commercetools.types.Money` `(Named` ``externalPrice`` `in Commercetools)`
    external_price: typing.Optional["Money"]
    #: Optional :class:`commercetools.types.ExternalLineItemTotalPrice` `(Named` ``externalTotalPrice`` `in Commercetools)`
    external_total_price: typing.Optional["ExternalLineItemTotalPrice"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None,
        external_price: typing.Optional["Money"] = None,
        external_total_price: typing.Optional["ExternalLineItemTotalPrice"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.quantity = quantity
        self.external_price = external_price
        self.external_total_price = external_total_price
        super().__init__(action="changeLineItemQuantity")

    def __repr__(self) -> str:
        return (
            "CartChangeLineItemQuantityAction(action=%r, line_item_id=%r, quantity=%r, external_price=%r, external_total_price=%r)"
            % (
                self.action,
                self.line_item_id,
                self.quantity,
                self.external_price,
                self.external_total_price,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartChangeTaxCalculationModeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartChangeTaxCalculationModeActionSchema`."
    #: :class:`commercetools.types.TaxCalculationMode` `(Named` ``taxCalculationMode`` `in Commercetools)`
    tax_calculation_mode: typing.Optional["TaxCalculationMode"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        tax_calculation_mode: typing.Optional["TaxCalculationMode"] = None
    ) -> None:
        self.tax_calculation_mode = tax_calculation_mode
        super().__init__(action="changeTaxCalculationMode")

    def __repr__(self) -> str:
        return (
            "CartChangeTaxCalculationModeAction(action=%r, tax_calculation_mode=%r)"
            % (self.action, self.tax_calculation_mode)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartChangeTaxModeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartChangeTaxModeActionSchema`."
    #: :class:`commercetools.types.TaxMode` `(Named` ``taxMode`` `in Commercetools)`
    tax_mode: typing.Optional["TaxMode"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        tax_mode: typing.Optional["TaxMode"] = None
    ) -> None:
        self.tax_mode = tax_mode
        super().__init__(action="changeTaxMode")

    def __repr__(self) -> str:
        return "CartChangeTaxModeAction(action=%r, tax_mode=%r)" % (
            self.action,
            self.tax_mode,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartChangeTaxRoundingModeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartChangeTaxRoundingModeActionSchema`."
    #: :class:`commercetools.types.RoundingMode` `(Named` ``taxRoundingMode`` `in Commercetools)`
    tax_rounding_mode: typing.Optional["RoundingMode"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        tax_rounding_mode: typing.Optional["RoundingMode"] = None
    ) -> None:
        self.tax_rounding_mode = tax_rounding_mode
        super().__init__(action="changeTaxRoundingMode")

    def __repr__(self) -> str:
        return "CartChangeTaxRoundingModeAction(action=%r, tax_rounding_mode=%r)" % (
            self.action,
            self.tax_rounding_mode,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartRecalculateAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartRecalculateActionSchema`."
    #: Optional :class:`bool` `(Named` ``updateProductData`` `in Commercetools)`
    update_product_data: typing.Optional[bool]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        update_product_data: typing.Optional[bool] = None
    ) -> None:
        self.update_product_data = update_product_data
        super().__init__(action="recalculate")

    def __repr__(self) -> str:
        return "CartRecalculateAction(action=%r, update_product_data=%r)" % (
            self.action,
            self.update_product_data,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartRemoveCustomLineItemAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartRemoveCustomLineItemActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        super().__init__(action="removeCustomLineItem")

    def __repr__(self) -> str:
        return "CartRemoveCustomLineItemAction(action=%r, custom_line_item_id=%r)" % (
            self.action,
            self.custom_line_item_id,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartRemoveDiscountCodeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartRemoveDiscountCodeActionSchema`."
    #: :class:`commercetools.types.DiscountCodeReference` `(Named` ``discountCode`` `in Commercetools)`
    discount_code: typing.Optional["DiscountCodeReference"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        discount_code: typing.Optional["DiscountCodeReference"] = None
    ) -> None:
        self.discount_code = discount_code
        super().__init__(action="removeDiscountCode")

    def __repr__(self) -> str:
        return "CartRemoveDiscountCodeAction(action=%r, discount_code=%r)" % (
            self.action,
            self.discount_code,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartRemoveItemShippingAddressAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartRemoveItemShippingAddressActionSchema`."
    #: :class:`str` `(Named` ``addressKey`` `in Commercetools)`
    address_key: typing.Optional[str]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        address_key: typing.Optional[str] = None
    ) -> None:
        self.address_key = address_key
        super().__init__(action="removeItemShippingAddress")

    def __repr__(self) -> str:
        return "CartRemoveItemShippingAddressAction(action=%r, address_key=%r)" % (
            self.action,
            self.address_key,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartRemoveLineItemAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartRemoveLineItemActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`int`
    quantity: typing.Optional[int]
    #: Optional :class:`commercetools.types.Money` `(Named` ``externalPrice`` `in Commercetools)`
    external_price: typing.Optional["Money"]
    #: Optional :class:`commercetools.types.ExternalLineItemTotalPrice` `(Named` ``externalTotalPrice`` `in Commercetools)`
    external_total_price: typing.Optional["ExternalLineItemTotalPrice"]
    #: Optional :class:`commercetools.types.ItemShippingDetailsDraft` `(Named` ``shippingDetailsToRemove`` `in Commercetools)`
    shipping_details_to_remove: typing.Optional["ItemShippingDetailsDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        quantity: typing.Optional[int] = None,
        external_price: typing.Optional["Money"] = None,
        external_total_price: typing.Optional["ExternalLineItemTotalPrice"] = None,
        shipping_details_to_remove: typing.Optional["ItemShippingDetailsDraft"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.quantity = quantity
        self.external_price = external_price
        self.external_total_price = external_total_price
        self.shipping_details_to_remove = shipping_details_to_remove
        super().__init__(action="removeLineItem")

    def __repr__(self) -> str:
        return (
            "CartRemoveLineItemAction(action=%r, line_item_id=%r, quantity=%r, external_price=%r, external_total_price=%r, shipping_details_to_remove=%r)"
            % (
                self.action,
                self.line_item_id,
                self.quantity,
                self.external_price,
                self.external_total_price,
                self.shipping_details_to_remove,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartRemovePaymentAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartRemovePaymentActionSchema`."
    #: :class:`commercetools.types.PaymentReference`
    payment: typing.Optional["PaymentReference"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        payment: typing.Optional["PaymentReference"] = None
    ) -> None:
        self.payment = payment
        super().__init__(action="removePayment")

    def __repr__(self) -> str:
        return "CartRemovePaymentAction(action=%r, payment=%r)" % (
            self.action,
            self.payment,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetAnonymousIdAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetAnonymousIdActionSchema`."
    #: Optional :class:`str` `(Named` ``anonymousId`` `in Commercetools)`
    anonymous_id: typing.Optional[str]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        anonymous_id: typing.Optional[str] = None
    ) -> None:
        self.anonymous_id = anonymous_id
        super().__init__(action="setAnonymousId")

    def __repr__(self) -> str:
        return "CartSetAnonymousIdAction(action=%r, anonymous_id=%r)" % (
            self.action,
            self.anonymous_id,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetBillingAddressAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetBillingAddressActionSchema`."
    #: Optional :class:`commercetools.types.Address`
    address: typing.Optional["Address"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        address: typing.Optional["Address"] = None
    ) -> None:
        self.address = address
        super().__init__(action="setBillingAddress")

    def __repr__(self) -> str:
        return "CartSetBillingAddressAction(action=%r, address=%r)" % (
            self.action,
            self.address,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCartTotalTaxAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCartTotalTaxActionSchema`."
    #: :class:`commercetools.types.Money` `(Named` ``externalTotalGross`` `in Commercetools)`
    external_total_gross: typing.Optional["Money"]
    #: Optional list of :class:`commercetools.types.TaxPortion` `(Named` ``externalTaxPortions`` `in Commercetools)`
    external_tax_portions: typing.Optional[typing.List["TaxPortion"]]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        external_total_gross: typing.Optional["Money"] = None,
        external_tax_portions: typing.Optional[typing.List["TaxPortion"]] = None
    ) -> None:
        self.external_total_gross = external_total_gross
        self.external_tax_portions = external_tax_portions
        super().__init__(action="setCartTotalTax")

    def __repr__(self) -> str:
        return (
            "CartSetCartTotalTaxAction(action=%r, external_total_gross=%r, external_tax_portions=%r)"
            % (self.action, self.external_total_gross, self.external_tax_portions)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCountryAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCountryActionSchema`."
    #: Optional :class:`str`
    country: typing.Optional["str"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        country: typing.Optional["str"] = None
    ) -> None:
        self.country = country
        super().__init__(action="setCountry")

    def __repr__(self) -> str:
        return "CartSetCountryAction(action=%r, country=%r)" % (
            self.action,
            self.country,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomFieldAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomFieldActionSchema`."
    #: :class:`str`
    name: typing.Optional[str]
    #: Optional :class:`typing.Any`
    value: typing.Optional[typing.Any]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        name: typing.Optional[str] = None,
        value: typing.Optional[typing.Any] = None
    ) -> None:
        self.name = name
        self.value = value
        super().__init__(action="setCustomField")

    def __repr__(self) -> str:
        return "CartSetCustomFieldAction(action=%r, name=%r, value=%r)" % (
            self.action,
            self.name,
            self.value,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomLineItemCustomFieldAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomLineItemCustomFieldActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: :class:`str`
    name: typing.Optional[str]
    #: Optional :class:`typing.Any`
    value: typing.Optional[typing.Any]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        name: typing.Optional[str] = None,
        value: typing.Optional[typing.Any] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.name = name
        self.value = value
        super().__init__(action="setCustomLineItemCustomField")

    def __repr__(self) -> str:
        return (
            "CartSetCustomLineItemCustomFieldAction(action=%r, custom_line_item_id=%r, name=%r, value=%r)"
            % (self.action, self.custom_line_item_id, self.name, self.value)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomLineItemCustomTypeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomLineItemCustomTypeActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.TypeReference`
    type: typing.Optional["TypeReference"]
    #: Optional :class:`commercetools.types.FieldContainer`
    fields: typing.Optional["FieldContainer"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        type: typing.Optional["TypeReference"] = None,
        fields: typing.Optional["FieldContainer"] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.type = type
        self.fields = fields
        super().__init__(action="setCustomLineItemCustomType")

    def __repr__(self) -> str:
        return (
            "CartSetCustomLineItemCustomTypeAction(action=%r, custom_line_item_id=%r, type=%r, fields=%r)"
            % (self.action, self.custom_line_item_id, self.type, self.fields)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomLineItemShippingDetailsAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomLineItemShippingDetailsActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ItemShippingDetailsDraft` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetailsDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        shipping_details: typing.Optional["ItemShippingDetailsDraft"] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.shipping_details = shipping_details
        super().__init__(action="setCustomLineItemShippingDetails")

    def __repr__(self) -> str:
        return (
            "CartSetCustomLineItemShippingDetailsAction(action=%r, custom_line_item_id=%r, shipping_details=%r)"
            % (self.action, self.custom_line_item_id, self.shipping_details)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomLineItemTaxAmountAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomLineItemTaxAmountActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ExternalTaxAmountDraft` `(Named` ``externalTaxAmount`` `in Commercetools)`
    external_tax_amount: typing.Optional["ExternalTaxAmountDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        external_tax_amount: typing.Optional["ExternalTaxAmountDraft"] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.external_tax_amount = external_tax_amount
        super().__init__(action="setCustomLineItemTaxAmount")

    def __repr__(self) -> str:
        return (
            "CartSetCustomLineItemTaxAmountAction(action=%r, custom_line_item_id=%r, external_tax_amount=%r)"
            % (self.action, self.custom_line_item_id, self.external_tax_amount)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomLineItemTaxRateAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomLineItemTaxRateActionSchema`."
    #: :class:`str` `(Named` ``customLineItemId`` `in Commercetools)`
    custom_line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        custom_line_item_id: typing.Optional[str] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.custom_line_item_id = custom_line_item_id
        self.external_tax_rate = external_tax_rate
        super().__init__(action="setCustomLineItemTaxRate")

    def __repr__(self) -> str:
        return (
            "CartSetCustomLineItemTaxRateAction(action=%r, custom_line_item_id=%r, external_tax_rate=%r)"
            % (self.action, self.custom_line_item_id, self.external_tax_rate)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomShippingMethodAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomShippingMethodActionSchema`."
    #: :class:`str` `(Named` ``shippingMethodName`` `in Commercetools)`
    shipping_method_name: typing.Optional[str]
    #: :class:`commercetools.types.ShippingRateDraft` `(Named` ``shippingRate`` `in Commercetools)`
    shipping_rate: typing.Optional["ShippingRateDraft"]
    #: Optional :class:`commercetools.types.TaxCategoryReference` `(Named` ``taxCategory`` `in Commercetools)`
    tax_category: typing.Optional["TaxCategoryReference"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        shipping_method_name: typing.Optional[str] = None,
        shipping_rate: typing.Optional["ShippingRateDraft"] = None,
        tax_category: typing.Optional["TaxCategoryReference"] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.shipping_method_name = shipping_method_name
        self.shipping_rate = shipping_rate
        self.tax_category = tax_category
        self.external_tax_rate = external_tax_rate
        super().__init__(action="setCustomShippingMethod")

    def __repr__(self) -> str:
        return (
            "CartSetCustomShippingMethodAction(action=%r, shipping_method_name=%r, shipping_rate=%r, tax_category=%r, external_tax_rate=%r)"
            % (
                self.action,
                self.shipping_method_name,
                self.shipping_rate,
                self.tax_category,
                self.external_tax_rate,
            )
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomTypeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomTypeActionSchema`."
    #: Optional :class:`commercetools.types.TypeReference`
    type: typing.Optional["TypeReference"]
    #: Optional :class:`commercetools.types.FieldContainer`
    fields: typing.Optional["FieldContainer"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        type: typing.Optional["TypeReference"] = None,
        fields: typing.Optional["FieldContainer"] = None
    ) -> None:
        self.type = type
        self.fields = fields
        super().__init__(action="setCustomType")

    def __repr__(self) -> str:
        return "CartSetCustomTypeAction(action=%r, type=%r, fields=%r)" % (
            self.action,
            self.type,
            self.fields,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomerEmailAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomerEmailActionSchema`."
    #: :class:`str`
    email: typing.Optional[str]

    def __init__(
        self, *, action: typing.Optional[str] = None, email: typing.Optional[str] = None
    ) -> None:
        self.email = email
        super().__init__(action="setCustomerEmail")

    def __repr__(self) -> str:
        return "CartSetCustomerEmailAction(action=%r, email=%r)" % (
            self.action,
            self.email,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomerGroupAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomerGroupActionSchema`."
    #: Optional :class:`commercetools.types.CustomerGroupReference` `(Named` ``customerGroup`` `in Commercetools)`
    customer_group: typing.Optional["CustomerGroupReference"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        customer_group: typing.Optional["CustomerGroupReference"] = None
    ) -> None:
        self.customer_group = customer_group
        super().__init__(action="setCustomerGroup")

    def __repr__(self) -> str:
        return "CartSetCustomerGroupAction(action=%r, customer_group=%r)" % (
            self.action,
            self.customer_group,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetCustomerIdAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetCustomerIdActionSchema`."
    #: Optional :class:`str` `(Named` ``customerId`` `in Commercetools)`
    customer_id: typing.Optional[str]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        customer_id: typing.Optional[str] = None
    ) -> None:
        self.customer_id = customer_id
        super().__init__(action="setCustomerId")

    def __repr__(self) -> str:
        return "CartSetCustomerIdAction(action=%r, customer_id=%r)" % (
            self.action,
            self.customer_id,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetDeleteDaysAfterLastModificationAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetDeleteDaysAfterLastModificationActionSchema`."
    #: Optional :class:`int` `(Named` ``deleteDaysAfterLastModification`` `in Commercetools)`
    delete_days_after_last_modification: typing.Optional[int]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        delete_days_after_last_modification: typing.Optional[int] = None
    ) -> None:
        self.delete_days_after_last_modification = delete_days_after_last_modification
        super().__init__(action="setDeleteDaysAfterLastModification")

    def __repr__(self) -> str:
        return (
            "CartSetDeleteDaysAfterLastModificationAction(action=%r, delete_days_after_last_modification=%r)"
            % (self.action, self.delete_days_after_last_modification)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemCustomFieldAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemCustomFieldActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: :class:`str`
    name: typing.Optional[str]
    #: Optional :class:`typing.Any`
    value: typing.Optional[typing.Any]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        name: typing.Optional[str] = None,
        value: typing.Optional[typing.Any] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.name = name
        self.value = value
        super().__init__(action="setLineItemCustomField")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemCustomFieldAction(action=%r, line_item_id=%r, name=%r, value=%r)"
            % (self.action, self.line_item_id, self.name, self.value)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemCustomTypeAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemCustomTypeActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.TypeReference`
    type: typing.Optional["TypeReference"]
    #: Optional :class:`commercetools.types.FieldContainer`
    fields: typing.Optional["FieldContainer"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        type: typing.Optional["TypeReference"] = None,
        fields: typing.Optional["FieldContainer"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.type = type
        self.fields = fields
        super().__init__(action="setLineItemCustomType")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemCustomTypeAction(action=%r, line_item_id=%r, type=%r, fields=%r)"
            % (self.action, self.line_item_id, self.type, self.fields)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemPriceAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemPriceActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.Money` `(Named` ``externalPrice`` `in Commercetools)`
    external_price: typing.Optional["Money"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        external_price: typing.Optional["Money"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.external_price = external_price
        super().__init__(action="setLineItemPrice")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemPriceAction(action=%r, line_item_id=%r, external_price=%r)"
            % (self.action, self.line_item_id, self.external_price)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemShippingDetailsAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemShippingDetailsActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ItemShippingDetailsDraft` `(Named` ``shippingDetails`` `in Commercetools)`
    shipping_details: typing.Optional["ItemShippingDetailsDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        shipping_details: typing.Optional["ItemShippingDetailsDraft"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.shipping_details = shipping_details
        super().__init__(action="setLineItemShippingDetails")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemShippingDetailsAction(action=%r, line_item_id=%r, shipping_details=%r)"
            % (self.action, self.line_item_id, self.shipping_details)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemTaxAmountAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemTaxAmountActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ExternalTaxAmountDraft` `(Named` ``externalTaxAmount`` `in Commercetools)`
    external_tax_amount: typing.Optional["ExternalTaxAmountDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        external_tax_amount: typing.Optional["ExternalTaxAmountDraft"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.external_tax_amount = external_tax_amount
        super().__init__(action="setLineItemTaxAmount")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemTaxAmountAction(action=%r, line_item_id=%r, external_tax_amount=%r)"
            % (self.action, self.line_item_id, self.external_tax_amount)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemTaxRateAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemTaxRateActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.external_tax_rate = external_tax_rate
        super().__init__(action="setLineItemTaxRate")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemTaxRateAction(action=%r, line_item_id=%r, external_tax_rate=%r)"
            % (self.action, self.line_item_id, self.external_tax_rate)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLineItemTotalPriceAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLineItemTotalPriceActionSchema`."
    #: :class:`str` `(Named` ``lineItemId`` `in Commercetools)`
    line_item_id: typing.Optional[str]
    #: Optional :class:`commercetools.types.ExternalLineItemTotalPrice` `(Named` ``externalTotalPrice`` `in Commercetools)`
    external_total_price: typing.Optional["ExternalLineItemTotalPrice"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        line_item_id: typing.Optional[str] = None,
        external_total_price: typing.Optional["ExternalLineItemTotalPrice"] = None
    ) -> None:
        self.line_item_id = line_item_id
        self.external_total_price = external_total_price
        super().__init__(action="setLineItemTotalPrice")

    def __repr__(self) -> str:
        return (
            "CartSetLineItemTotalPriceAction(action=%r, line_item_id=%r, external_total_price=%r)"
            % (self.action, self.line_item_id, self.external_total_price)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetLocaleAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetLocaleActionSchema`."
    #: Optional :class:`str`
    locale: typing.Optional[str]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        locale: typing.Optional[str] = None
    ) -> None:
        self.locale = locale
        super().__init__(action="setLocale")

    def __repr__(self) -> str:
        return "CartSetLocaleAction(action=%r, locale=%r)" % (self.action, self.locale)


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetShippingAddressAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetShippingAddressActionSchema`."
    #: Optional :class:`commercetools.types.Address`
    address: typing.Optional["Address"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        address: typing.Optional["Address"] = None
    ) -> None:
        self.address = address
        super().__init__(action="setShippingAddress")

    def __repr__(self) -> str:
        return "CartSetShippingAddressAction(action=%r, address=%r)" % (
            self.action,
            self.address,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetShippingMethodAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetShippingMethodActionSchema`."
    #: Optional :class:`commercetools.types.TypeReference` `(Named` ``shippingMethod`` `in Commercetools)`
    shipping_method: typing.Optional["TypeReference"]
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        shipping_method: typing.Optional["TypeReference"] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.shipping_method = shipping_method
        self.external_tax_rate = external_tax_rate
        super().__init__(action="setShippingMethod")

    def __repr__(self) -> str:
        return (
            "CartSetShippingMethodAction(action=%r, shipping_method=%r, external_tax_rate=%r)"
            % (self.action, self.shipping_method, self.external_tax_rate)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetShippingMethodTaxAmountAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetShippingMethodTaxAmountActionSchema`."
    #: Optional :class:`commercetools.types.ExternalTaxAmountDraft` `(Named` ``externalTaxAmount`` `in Commercetools)`
    external_tax_amount: typing.Optional["ExternalTaxAmountDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        external_tax_amount: typing.Optional["ExternalTaxAmountDraft"] = None
    ) -> None:
        self.external_tax_amount = external_tax_amount
        super().__init__(action="setShippingMethodTaxAmount")

    def __repr__(self) -> str:
        return (
            "CartSetShippingMethodTaxAmountAction(action=%r, external_tax_amount=%r)"
            % (self.action, self.external_tax_amount)
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetShippingMethodTaxRateAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetShippingMethodTaxRateActionSchema`."
    #: Optional :class:`commercetools.types.ExternalTaxRateDraft` `(Named` ``externalTaxRate`` `in Commercetools)`
    external_tax_rate: typing.Optional["ExternalTaxRateDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        external_tax_rate: typing.Optional["ExternalTaxRateDraft"] = None
    ) -> None:
        self.external_tax_rate = external_tax_rate
        super().__init__(action="setShippingMethodTaxRate")

    def __repr__(self) -> str:
        return "CartSetShippingMethodTaxRateAction(action=%r, external_tax_rate=%r)" % (
            self.action,
            self.external_tax_rate,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartSetShippingRateInputAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartSetShippingRateInputActionSchema`."
    #: Optional :class:`commercetools.types.ShippingRateInputDraft` `(Named` ``shippingRateInput`` `in Commercetools)`
    shipping_rate_input: typing.Optional["ShippingRateInputDraft"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        shipping_rate_input: typing.Optional["ShippingRateInputDraft"] = None
    ) -> None:
        self.shipping_rate_input = shipping_rate_input
        super().__init__(action="setShippingRateInput")

    def __repr__(self) -> str:
        return "CartSetShippingRateInputAction(action=%r, shipping_rate_input=%r)" % (
            self.action,
            self.shipping_rate_input,
        )


@attr.s(auto_attribs=True, init=False, repr=False)
class CartUpdateItemShippingAddressAction(CartUpdateAction):
    "Corresponding marshmallow schema is :class:`commercetools.schemas.CartUpdateItemShippingAddressActionSchema`."
    #: :class:`commercetools.types.Address`
    address: typing.Optional["Address"]

    def __init__(
        self,
        *,
        action: typing.Optional[str] = None,
        address: typing.Optional["Address"] = None
    ) -> None:
        self.address = address
        super().__init__(action="updateItemShippingAddress")

    def __repr__(self) -> str:
        return "CartUpdateItemShippingAddressAction(action=%r, address=%r)" % (
            self.action,
            self.address,
        )
