# coding: utf-8

"""
    Alteryx Server API V3

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

from src.server_client.configuration import Configuration


class DCMEUpsertConnectionAdminContract(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 = {
        'owner_id': 'str',
        'id': 'str',
        'name': 'str',
        'schema_name': 'str',
        'allow_in_sdks': 'bool',
        'parameters': 'dict(str, object)',
        'data_source': 'DCMEObjectWrapperContractDCMEDataSourceContract',
        'credentials': 'dict(str, DCMEObjectWrapperContractDCMECredentialContract)'
    }

    attribute_map = {
        'owner_id': 'ownerId',
        'id': 'id',
        'name': 'name',
        'schema_name': 'schemaName',
        'allow_in_sdks': 'allowInSdks',
        'parameters': 'parameters',
        'data_source': 'dataSource',
        'credentials': 'credentials'
    }

    def __init__(self, owner_id=None, id=None, name=None, schema_name=None, allow_in_sdks=None, parameters=None, data_source=None, credentials=None, _configuration=None):  # noqa: E501
        """DCMEUpsertConnectionAdminContract - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._owner_id = None
        self._id = None
        self._name = None
        self._schema_name = None
        self._allow_in_sdks = None
        self._parameters = None
        self._data_source = None
        self._credentials = None
        self.discriminator = None

        self.owner_id = owner_id
        if id is not None:
            self.id = id
        self.name = name
        self.schema_name = schema_name
        if allow_in_sdks is not None:
            self.allow_in_sdks = allow_in_sdks
        self.parameters = parameters
        self.data_source = data_source
        self.credentials = credentials

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


        :return: The owner_id of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: str
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this DCMEUpsertConnectionAdminContract.


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

        self._owner_id = owner_id

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


        :return: The id of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this DCMEUpsertConnectionAdminContract.


        :param id: The id of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The name of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this DCMEUpsertConnectionAdminContract.


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

        self._name = name

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


        :return: The schema_name of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: str
        """
        return self._schema_name

    @schema_name.setter
    def schema_name(self, schema_name):
        """Sets the schema_name of this DCMEUpsertConnectionAdminContract.


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

        self._schema_name = schema_name

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


        :return: The allow_in_sdks of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: bool
        """
        return self._allow_in_sdks

    @allow_in_sdks.setter
    def allow_in_sdks(self, allow_in_sdks):
        """Sets the allow_in_sdks of this DCMEUpsertConnectionAdminContract.


        :param allow_in_sdks: The allow_in_sdks of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :type: bool
        """

        self._allow_in_sdks = allow_in_sdks

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


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

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


        :param parameters: The parameters of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :type: dict(str, object)
        """
        if self._configuration.client_side_validation and parameters is None:
            raise ValueError("Invalid value for `parameters`, must not be `None`")  # noqa: E501

        self._parameters = parameters

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


        :return: The data_source of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: DCMEObjectWrapperContractDCMEDataSourceContract
        """
        return self._data_source

    @data_source.setter
    def data_source(self, data_source):
        """Sets the data_source of this DCMEUpsertConnectionAdminContract.


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

        self._data_source = data_source

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


        :return: The credentials of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :rtype: dict(str, DCMEObjectWrapperContractDCMECredentialContract)
        """
        return self._credentials

    @credentials.setter
    def credentials(self, credentials):
        """Sets the credentials of this DCMEUpsertConnectionAdminContract.


        :param credentials: The credentials of this DCMEUpsertConnectionAdminContract.  # noqa: E501
        :type: dict(str, DCMEObjectWrapperContractDCMECredentialContract)
        """
        if self._configuration.client_side_validation and credentials is None:
            raise ValueError("Invalid value for `credentials`, must not be `None`")  # noqa: E501

        self._credentials = credentials

    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(DCMEUpsertConnectionAdminContract, 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, DCMEUpsertConnectionAdminContract):
            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, DCMEUpsertConnectionAdminContract):
            return True

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