# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class V1PageCell(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, page_id=None, row=None, column=None, object_type=None, object_id=None, placeholder_type=None):
        """
        V1PageCell - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'page_id': 'str',
            'row': 'int',
            'column': 'int',
            'object_type': 'str',
            'object_id': 'str',
            'placeholder_type': 'str'
        }

        self.attribute_map = {
            'page_id': 'page_id',
            'row': 'row',
            'column': 'column',
            'object_type': 'object_type',
            'object_id': 'object_id',
            'placeholder_type': 'placeholder_type'
        }

        self._page_id = page_id
        self._row = row
        self._column = column
        self._object_type = object_type
        self._object_id = object_id
        self._placeholder_type = placeholder_type

    @property
    def page_id(self):
        """
        Gets the page_id of this V1PageCell.
        The unique identifier of the page the cell is included on.

        :return: The page_id of this V1PageCell.
        :rtype: str
        """
        return self._page_id

    @page_id.setter
    def page_id(self, page_id):
        """
        Sets the page_id of this V1PageCell.
        The unique identifier of the page the cell is included on.

        :param page_id: The page_id of this V1PageCell.
        :type: str
        """

        self._page_id = page_id

    @property
    def row(self):
        """
        Gets the row of this V1PageCell.
        The row of the cell. Always an integer between 0 and 4, inclusive.

        :return: The row of this V1PageCell.
        :rtype: int
        """
        return self._row

    @row.setter
    def row(self, row):
        """
        Sets the row of this V1PageCell.
        The row of the cell. Always an integer between 0 and 4, inclusive.

        :param row: The row of this V1PageCell.
        :type: int
        """

        self._row = row

    @property
    def column(self):
        """
        Gets the column of this V1PageCell.
        The column of the cell. Always an integer between 0 and 4, inclusive.

        :return: The column of this V1PageCell.
        :rtype: int
        """
        return self._column

    @column.setter
    def column(self, column):
        """
        Sets the column of this V1PageCell.
        The column of the cell. Always an integer between 0 and 4, inclusive.

        :param column: The column of this V1PageCell.
        :type: int
        """

        self._column = column

    @property
    def object_type(self):
        """
        Gets the object_type of this V1PageCell.
        The type of entity represented in the cell (ITEM, DISCOUNT, CATEGORY, or PLACEHOLDER). See [V1PageCellObjectType](#type-v1pagecellobjecttype) for possible values

        :return: The object_type of this V1PageCell.
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """
        Sets the object_type of this V1PageCell.
        The type of entity represented in the cell (ITEM, DISCOUNT, CATEGORY, or PLACEHOLDER). See [V1PageCellObjectType](#type-v1pagecellobjecttype) for possible values

        :param object_type: The object_type of this V1PageCell.
        :type: str
        """

        self._object_type = object_type

    @property
    def object_id(self):
        """
        Gets the object_id of this V1PageCell.
        The unique identifier of the entity represented in the cell. Not present for cells with an object_type of PLACEHOLDER.

        :return: The object_id of this V1PageCell.
        :rtype: str
        """
        return self._object_id

    @object_id.setter
    def object_id(self, object_id):
        """
        Sets the object_id of this V1PageCell.
        The unique identifier of the entity represented in the cell. Not present for cells with an object_type of PLACEHOLDER.

        :param object_id: The object_id of this V1PageCell.
        :type: str
        """

        self._object_id = object_id

    @property
    def placeholder_type(self):
        """
        Gets the placeholder_type of this V1PageCell.
        For a cell with an object_type of PLACEHOLDER, this value indicates the cell's special behavior. See [V1PageCellPlaceholderType](#type-v1pagecellplaceholdertype) for possible values

        :return: The placeholder_type of this V1PageCell.
        :rtype: str
        """
        return self._placeholder_type

    @placeholder_type.setter
    def placeholder_type(self, placeholder_type):
        """
        Sets the placeholder_type of this V1PageCell.
        For a cell with an object_type of PLACEHOLDER, this value indicates the cell's special behavior. See [V1PageCellPlaceholderType](#type-v1pagecellplaceholdertype) for possible values

        :param placeholder_type: The placeholder_type of this V1PageCell.
        :type: str
        """

        self._placeholder_type = placeholder_type

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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
        """
        return self.__dict__ == other.__dict__

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