# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class TranscoderType(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 = {
        'reverse_address': 'str',
        'weight': 'int',
        'reverse_address_detected': 'str',
        'url': 'str',
        'job': 'list[JobStatusType]',
        'transcoder': 'list[TranscoderType]',
        'state': 'str',
        'version': 'str',
        'direct_access': 'list[TranscoderDirectAccess]',
        'configuration': 'TranscoderConfigurationType',
        'type': 'str',
        'max_job': 'int'
    }

    attribute_map = {
        'reverse_address': 'reverseAddress',
        'weight': 'weight',
        'reverse_address_detected': 'reverseAddressDetected',
        'url': 'url',
        'job': 'job',
        'transcoder': 'transcoder',
        'state': 'state',
        'version': 'version',
        'direct_access': 'directAccess',
        'configuration': 'configuration',
        'type': 'type',
        'max_job': 'maxJob'
    }

    def __init__(self, reverse_address=None, weight=None, reverse_address_detected=None, url=None, job=None, transcoder=None, state=None, version=None, direct_access=None, configuration=None, type=None, max_job=None):  # noqa: E501
        """TranscoderType - a model defined in OpenAPI"""  # noqa: E501

        self._reverse_address = None
        self._weight = None
        self._reverse_address_detected = None
        self._url = None
        self._job = None
        self._transcoder = None
        self._state = None
        self._version = None
        self._direct_access = None
        self._configuration = None
        self._type = None
        self._max_job = None
        self.discriminator = None

        if reverse_address is not None:
            self.reverse_address = reverse_address
        if weight is not None:
            self.weight = weight
        if reverse_address_detected is not None:
            self.reverse_address_detected = reverse_address_detected
        self.url = url
        if job is not None:
            self.job = job
        if transcoder is not None:
            self.transcoder = transcoder
        if state is not None:
            self.state = state
        if version is not None:
            self.version = version
        if direct_access is not None:
            self.direct_access = direct_access
        if configuration is not None:
            self.configuration = configuration
        if type is not None:
            self.type = type
        if max_job is not None:
            self.max_job = max_job

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


        :return: The reverse_address of this TranscoderType.  # noqa: E501
        :rtype: str
        """
        return self._reverse_address

    @reverse_address.setter
    def reverse_address(self, reverse_address):
        """Sets the reverse_address of this TranscoderType.


        :param reverse_address: The reverse_address of this TranscoderType.  # noqa: E501
        :type: str
        """

        self._reverse_address = reverse_address

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


        :return: The weight of this TranscoderType.  # noqa: E501
        :rtype: int
        """
        return self._weight

    @weight.setter
    def weight(self, weight):
        """Sets the weight of this TranscoderType.


        :param weight: The weight of this TranscoderType.  # noqa: E501
        :type: int
        """

        self._weight = weight

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


        :return: The reverse_address_detected of this TranscoderType.  # noqa: E501
        :rtype: str
        """
        return self._reverse_address_detected

    @reverse_address_detected.setter
    def reverse_address_detected(self, reverse_address_detected):
        """Sets the reverse_address_detected of this TranscoderType.


        :param reverse_address_detected: The reverse_address_detected of this TranscoderType.  # noqa: E501
        :type: str
        """

        self._reverse_address_detected = reverse_address_detected

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


        :return: The url of this TranscoderType.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this TranscoderType.


        :param url: The url of this TranscoderType.  # noqa: E501
        :type: str
        """
        if url is None:
            raise ValueError("Invalid value for `url`, must not be `None`")  # noqa: E501

        self._url = url

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


        :return: The job of this TranscoderType.  # noqa: E501
        :rtype: list[JobStatusType]
        """
        return self._job

    @job.setter
    def job(self, job):
        """Sets the job of this TranscoderType.


        :param job: The job of this TranscoderType.  # noqa: E501
        :type: list[JobStatusType]
        """

        self._job = job

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


        :return: The transcoder of this TranscoderType.  # noqa: E501
        :rtype: list[TranscoderType]
        """
        return self._transcoder

    @transcoder.setter
    def transcoder(self, transcoder):
        """Sets the transcoder of this TranscoderType.


        :param transcoder: The transcoder of this TranscoderType.  # noqa: E501
        :type: list[TranscoderType]
        """

        self._transcoder = transcoder

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


        :return: The state of this TranscoderType.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this TranscoderType.


        :param state: The state of this TranscoderType.  # noqa: E501
        :type: str
        """

        self._state = state

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


        :return: The version of this TranscoderType.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this TranscoderType.


        :param version: The version of this TranscoderType.  # noqa: E501
        :type: str
        """

        self._version = version

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


        :return: The direct_access of this TranscoderType.  # noqa: E501
        :rtype: list[TranscoderDirectAccess]
        """
        return self._direct_access

    @direct_access.setter
    def direct_access(self, direct_access):
        """Sets the direct_access of this TranscoderType.


        :param direct_access: The direct_access of this TranscoderType.  # noqa: E501
        :type: list[TranscoderDirectAccess]
        """

        self._direct_access = direct_access

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


        :return: The configuration of this TranscoderType.  # noqa: E501
        :rtype: TranscoderConfigurationType
        """
        return self._configuration

    @configuration.setter
    def configuration(self, configuration):
        """Sets the configuration of this TranscoderType.


        :param configuration: The configuration of this TranscoderType.  # noqa: E501
        :type: TranscoderConfigurationType
        """

        self._configuration = configuration

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


        :return: The type of this TranscoderType.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this TranscoderType.


        :param type: The type of this TranscoderType.  # noqa: E501
        :type: str
        """
        allowed_values = ["TRANSCODER", "DIRECTORY"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The max_job of this TranscoderType.  # noqa: E501
        :rtype: int
        """
        return self._max_job

    @max_job.setter
    def max_job(self, max_job):
        """Sets the max_job of this TranscoderType.


        :param max_job: The max_job of this TranscoderType.  # noqa: E501
        :type: int
        """

        self._max_job = max_job

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

        return self.__dict__ == other.__dict__

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