# 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 Link(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 = {
        'operation_ref': 'str',
        'operation_id': 'str',
        'parameters': 'dict(str, str)',
        'request_body': 'object',
        'headers': 'dict(str, Header)',
        'description': 'str',
        'getref': 'str',
        'extensions': 'dict(str, object)',
        'server': 'Server'
    }

    attribute_map = {
        'operation_ref': 'operationRef',
        'operation_id': 'operationId',
        'parameters': 'parameters',
        'request_body': 'requestBody',
        'headers': 'headers',
        'description': 'description',
        'getref': 'get$ref',
        'extensions': 'extensions',
        'server': 'server'
    }

    def __init__(self, operation_ref=None, operation_id=None, parameters=None, request_body=None, headers=None, description=None, getref=None, extensions=None, server=None):  # noqa: E501
        """Link - a model defined in OpenAPI"""  # noqa: E501

        self._operation_ref = None
        self._operation_id = None
        self._parameters = None
        self._request_body = None
        self._headers = None
        self._description = None
        self._getref = None
        self._extensions = None
        self._server = None
        self.discriminator = None

        if operation_ref is not None:
            self.operation_ref = operation_ref
        if operation_id is not None:
            self.operation_id = operation_id
        if parameters is not None:
            self.parameters = parameters
        if request_body is not None:
            self.request_body = request_body
        if headers is not None:
            self.headers = headers
        if description is not None:
            self.description = description
        if getref is not None:
            self.getref = getref
        if extensions is not None:
            self.extensions = extensions
        if server is not None:
            self.server = server

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


        :return: The operation_ref of this Link.  # noqa: E501
        :rtype: str
        """
        return self._operation_ref

    @operation_ref.setter
    def operation_ref(self, operation_ref):
        """Sets the operation_ref of this Link.


        :param operation_ref: The operation_ref of this Link.  # noqa: E501
        :type: str
        """

        self._operation_ref = operation_ref

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


        :return: The operation_id of this Link.  # noqa: E501
        :rtype: str
        """
        return self._operation_id

    @operation_id.setter
    def operation_id(self, operation_id):
        """Sets the operation_id of this Link.


        :param operation_id: The operation_id of this Link.  # noqa: E501
        :type: str
        """

        self._operation_id = operation_id

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


        :return: The parameters of this Link.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._parameters

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


        :param parameters: The parameters of this Link.  # noqa: E501
        :type: dict(str, str)
        """

        self._parameters = parameters

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


        :return: The request_body of this Link.  # noqa: E501
        :rtype: object
        """
        return self._request_body

    @request_body.setter
    def request_body(self, request_body):
        """Sets the request_body of this Link.


        :param request_body: The request_body of this Link.  # noqa: E501
        :type: object
        """

        self._request_body = request_body

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


        :return: The headers of this Link.  # noqa: E501
        :rtype: dict(str, Header)
        """
        return self._headers

    @headers.setter
    def headers(self, headers):
        """Sets the headers of this Link.


        :param headers: The headers of this Link.  # noqa: E501
        :type: dict(str, Header)
        """

        self._headers = headers

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


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

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


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

        self._description = description

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


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

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


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

        self._getref = getref

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


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

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


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

        self._extensions = extensions

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


        :return: The server of this Link.  # noqa: E501
        :rtype: Server
        """
        return self._server

    @server.setter
    def server(self, server):
        """Sets the server of this Link.


        :param server: The server of this Link.  # noqa: E501
        :type: Server
        """

        self._server = server

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

        return self.__dict__ == other.__dict__

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