# coding: utf-8

"""
    The Selling Partner API for FBA inbound operations.

    The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.

    The version of the OpenAPI document: 2024-03-20
    Generated by OpenAPI Generator (https://openapi-generator.tech)

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


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class ContentUpdatePreview(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'content_update_preview_id': 'str',
        'expiration': 'datetime',
        'requested_updates': 'RequestedUpdates',
        'transportation_option': 'TransportationOption',
    }

    attribute_map = {
        'content_update_preview_id': 'contentUpdatePreviewId',
        'expiration': 'expiration',
        'requested_updates': 'requestedUpdates',
        'transportation_option': 'transportationOption',
    }

    def __init__(self, content_update_preview_id=None, expiration=None, requested_updates=None, transportation_option=None, _configuration=None):  # noqa: E501
        """ContentUpdatePreview - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._content_update_preview_id = None
        self._expiration = None
        self._requested_updates = None
        self._transportation_option = None
        self.discriminator = None

        self.content_update_preview_id = content_update_preview_id
        self.expiration = expiration
        self.requested_updates = requested_updates
        self.transportation_option = transportation_option

    @property
    def content_update_preview_id(self):
        """Gets the content_update_preview_id of this ContentUpdatePreview.  # noqa: E501

        Identifier of a content update preview.  # noqa: E501

        :return: The content_update_preview_id of this ContentUpdatePreview.  # noqa: E501
        :rtype: str
        """
        return self._content_update_preview_id

    @content_update_preview_id.setter
    def content_update_preview_id(self, content_update_preview_id):
        """Sets the content_update_preview_id of this ContentUpdatePreview.

        Identifier of a content update preview.  # noqa: E501

        :param content_update_preview_id: The content_update_preview_id of this ContentUpdatePreview.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and content_update_preview_id is None:
            raise ValueError("Invalid value for `content_update_preview_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                content_update_preview_id is not None and len(content_update_preview_id) > 38):
            raise ValueError("Invalid value for `content_update_preview_id`, length must be less than or equal to `38`")  # noqa: E501
        if (self._configuration.client_side_validation and
                content_update_preview_id is not None and len(content_update_preview_id) < 38):
            raise ValueError("Invalid value for `content_update_preview_id`, length must be greater than or equal to `38`")  # noqa: E501
        if (self._configuration.client_side_validation and
                content_update_preview_id is not None and not re.search(r'^[a-zA-Z0-9-]*$', content_update_preview_id)):  # noqa: E501
            raise ValueError(r"Invalid value for `content_update_preview_id`, must be a follow pattern or equal to `/^[a-zA-Z0-9-]*$/`")  # noqa: E501

        self._content_update_preview_id = content_update_preview_id

    @property
    def expiration(self):
        """Gets the expiration of this ContentUpdatePreview.  # noqa: E501

        The time at which the content update expires. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ss.sssZ`.  # noqa: E501

        :return: The expiration of this ContentUpdatePreview.  # noqa: E501
        :rtype: datetime
        """
        return self._expiration

    @expiration.setter
    def expiration(self, expiration):
        """Sets the expiration of this ContentUpdatePreview.

        The time at which the content update expires. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ss.sssZ`.  # noqa: E501

        :param expiration: The expiration of this ContentUpdatePreview.  # noqa: E501
        :type: datetime
        """
        if self._configuration.client_side_validation and expiration is None:
            raise ValueError("Invalid value for `expiration`, must not be `None`")  # noqa: E501

        self._expiration = expiration

    @property
    def requested_updates(self):
        """Gets the requested_updates of this ContentUpdatePreview.  # noqa: E501


        :return: The requested_updates of this ContentUpdatePreview.  # noqa: E501
        :rtype: RequestedUpdates
        """
        return self._requested_updates

    @requested_updates.setter
    def requested_updates(self, requested_updates):
        """Sets the requested_updates of this ContentUpdatePreview.


        :param requested_updates: The requested_updates of this ContentUpdatePreview.  # noqa: E501
        :type: RequestedUpdates
        """
        if self._configuration.client_side_validation and requested_updates is None:
            raise ValueError("Invalid value for `requested_updates`, must not be `None`")  # noqa: E501

        self._requested_updates = requested_updates

    @property
    def transportation_option(self):
        """Gets the transportation_option of this ContentUpdatePreview.  # noqa: E501


        :return: The transportation_option of this ContentUpdatePreview.  # noqa: E501
        :rtype: TransportationOption
        """
        return self._transportation_option

    @transportation_option.setter
    def transportation_option(self, transportation_option):
        """Sets the transportation_option of this ContentUpdatePreview.


        :param transportation_option: The transportation_option of this ContentUpdatePreview.  # noqa: E501
        :type: TransportationOption
        """
        if self._configuration.client_side_validation and transportation_option is None:
            raise ValueError("Invalid value for `transportation_option`, must not be `None`")  # noqa: E501

        self._transportation_option = transportation_option

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(ContentUpdatePreview, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ContentUpdatePreview):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ContentUpdatePreview):
            return True

        return self.to_dict() != other.to_dict()
