# coding: utf-8

"""
    convertapi

    Convert API lets you effortlessly convert file formats and types.  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class DocxParagraph(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 = {
        'paragraph_index': 'int',
        'path': 'str',
        'content_runs': 'list[DocxRun]',
        'style_id': 'str'
    }

    attribute_map = {
        'paragraph_index': 'ParagraphIndex',
        'path': 'Path',
        'content_runs': 'ContentRuns',
        'style_id': 'StyleID'
    }

    def __init__(self, paragraph_index=None, path=None, content_runs=None, style_id=None):  # noqa: E501
        """DocxParagraph - a model defined in Swagger"""  # noqa: E501

        self._paragraph_index = None
        self._path = None
        self._content_runs = None
        self._style_id = None
        self.discriminator = None

        if paragraph_index is not None:
            self.paragraph_index = paragraph_index
        if path is not None:
            self.path = path
        if content_runs is not None:
            self.content_runs = content_runs
        if style_id is not None:
            self.style_id = style_id

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

        The index of the paragraph; 0-based  # noqa: E501

        :return: The paragraph_index of this DocxParagraph.  # noqa: E501
        :rtype: int
        """
        return self._paragraph_index

    @paragraph_index.setter
    def paragraph_index(self, paragraph_index):
        """Sets the paragraph_index of this DocxParagraph.

        The index of the paragraph; 0-based  # noqa: E501

        :param paragraph_index: The paragraph_index of this DocxParagraph.  # noqa: E501
        :type: int
        """

        self._paragraph_index = paragraph_index

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

        The Path of the location of this Paragraph object; leave blank during creation  # noqa: E501

        :return: The path of this DocxParagraph.  # noqa: E501
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """Sets the path of this DocxParagraph.

        The Path of the location of this Paragraph object; leave blank during creation  # noqa: E501

        :param path: The path of this DocxParagraph.  # noqa: E501
        :type: str
        """

        self._path = path

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

        The content runs in the paragraph - this is where text is stored; similar to a span in HTML  # noqa: E501

        :return: The content_runs of this DocxParagraph.  # noqa: E501
        :rtype: list[DocxRun]
        """
        return self._content_runs

    @content_runs.setter
    def content_runs(self, content_runs):
        """Sets the content_runs of this DocxParagraph.

        The content runs in the paragraph - this is where text is stored; similar to a span in HTML  # noqa: E501

        :param content_runs: The content_runs of this DocxParagraph.  # noqa: E501
        :type: list[DocxRun]
        """

        self._content_runs = content_runs

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

        Style ID of the style applied to the paragraph; null if no style is applied  # noqa: E501

        :return: The style_id of this DocxParagraph.  # noqa: E501
        :rtype: str
        """
        return self._style_id

    @style_id.setter
    def style_id(self, style_id):
        """Sets the style_id of this DocxParagraph.

        Style ID of the style applied to the paragraph; null if no style is applied  # noqa: E501

        :param style_id: The style_id of this DocxParagraph.  # noqa: E501
        :type: str
        """

        self._style_id = style_id

    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(DocxParagraph, 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, DocxParagraph):
            return False

        return self.__dict__ == other.__dict__

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