# coding: utf-8

"""
    Onshape REST API

    The Onshape REST API consumed by all clients.  # noqa: E501

    OpenAPI spec version: 1.96
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class PathItem(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'summary': 'str',
        'description': 'str',
        'get': 'Operation',
        'put': 'Operation',
        'post': 'Operation',
        'delete': 'Operation',
        'options': 'Operation',
        'head': 'Operation',
        'patch': 'Operation',
        'trace': 'Operation',
        'servers': 'list[Server]',
        'parameters': 'list[Parameter]',
        'getref': 'str',
        'extensions': 'dict(str, object)'
    }

    attribute_map = {
        'summary': 'summary',
        'description': 'description',
        'get': 'get',
        'put': 'put',
        'post': 'post',
        'delete': 'delete',
        'options': 'options',
        'head': 'head',
        'patch': 'patch',
        'trace': 'trace',
        'servers': 'servers',
        'parameters': 'parameters',
        'getref': 'get$ref',
        'extensions': 'extensions'
    }

    def __init__(self, summary=None, description=None, get=None, put=None, post=None, delete=None, options=None, head=None, patch=None, trace=None, servers=None, parameters=None, getref=None, extensions=None):  # noqa: E501
        """PathItem - a model defined in OpenAPI"""  # noqa: E501

        self._summary = None
        self._description = None
        self._get = None
        self._put = None
        self._post = None
        self._delete = None
        self._options = None
        self._head = None
        self._patch = None
        self._trace = None
        self._servers = None
        self._parameters = None
        self._getref = None
        self._extensions = None
        self.discriminator = None

        if summary is not None:
            self.summary = summary
        if description is not None:
            self.description = description
        if get is not None:
            self.get = get
        if put is not None:
            self.put = put
        if post is not None:
            self.post = post
        if delete is not None:
            self.delete = delete
        if options is not None:
            self.options = options
        if head is not None:
            self.head = head
        if patch is not None:
            self.patch = patch
        if trace is not None:
            self.trace = trace
        if servers is not None:
            self.servers = servers
        if parameters is not None:
            self.parameters = parameters
        if getref is not None:
            self.getref = getref
        if extensions is not None:
            self.extensions = extensions

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


        :return: The summary of this PathItem.  # noqa: E501
        :rtype: str
        """
        return self._summary

    @summary.setter
    def summary(self, summary):
        """Sets the summary of this PathItem.


        :param summary: The summary of this PathItem.  # noqa: E501
        :type: str
        """

        self._summary = summary

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


        :return: The description of this PathItem.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this PathItem.


        :param description: The description of this PathItem.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The get of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._get

    @get.setter
    def get(self, get):
        """Sets the get of this PathItem.


        :param get: The get of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._get = get

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


        :return: The put of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._put

    @put.setter
    def put(self, put):
        """Sets the put of this PathItem.


        :param put: The put of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._put = put

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


        :return: The post of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._post

    @post.setter
    def post(self, post):
        """Sets the post of this PathItem.


        :param post: The post of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._post = post

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


        :return: The delete of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._delete

    @delete.setter
    def delete(self, delete):
        """Sets the delete of this PathItem.


        :param delete: The delete of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._delete = delete

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


        :return: The options of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._options

    @options.setter
    def options(self, options):
        """Sets the options of this PathItem.


        :param options: The options of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._options = options

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


        :return: The head of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._head

    @head.setter
    def head(self, head):
        """Sets the head of this PathItem.


        :param head: The head of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._head = head

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


        :return: The patch of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._patch

    @patch.setter
    def patch(self, patch):
        """Sets the patch of this PathItem.


        :param patch: The patch of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._patch = patch

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


        :return: The trace of this PathItem.  # noqa: E501
        :rtype: Operation
        """
        return self._trace

    @trace.setter
    def trace(self, trace):
        """Sets the trace of this PathItem.


        :param trace: The trace of this PathItem.  # noqa: E501
        :type: Operation
        """

        self._trace = trace

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


        :return: The servers of this PathItem.  # noqa: E501
        :rtype: list[Server]
        """
        return self._servers

    @servers.setter
    def servers(self, servers):
        """Sets the servers of this PathItem.


        :param servers: The servers of this PathItem.  # noqa: E501
        :type: list[Server]
        """

        self._servers = servers

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


        :return: The parameters of this PathItem.  # noqa: E501
        :rtype: list[Parameter]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters):
        """Sets the parameters of this PathItem.


        :param parameters: The parameters of this PathItem.  # noqa: E501
        :type: list[Parameter]
        """

        self._parameters = parameters

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


        :return: The getref of this PathItem.  # noqa: E501
        :rtype: str
        """
        return self._getref

    @getref.setter
    def getref(self, getref):
        """Sets the getref of this PathItem.


        :param getref: The getref of this PathItem.  # noqa: E501
        :type: str
        """

        self._getref = getref

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


        :return: The extensions of this PathItem.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._extensions

    @extensions.setter
    def extensions(self, extensions):
        """Sets the extensions of this PathItem.


        :param extensions: The extensions of this PathItem.  # noqa: E501
        :type: dict(str, object)
        """

        self._extensions = extensions

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

        for attr, _ in six.iteritems(self.openapi_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 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, PathItem):
            return False

        return self.__dict__ == other.__dict__

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