# 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 CarbonPreset(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 = {
        'video_codec': 'str',
        'name': 'str',
        'description': 'str',
        'guid': 'str',
        'display_aspect_ratio': 'AspectRatioType',
        'audio_codec': 'str',
        'container_format': 'str'
    }

    attribute_map = {
        'video_codec': 'videoCodec',
        'name': 'name',
        'description': 'description',
        'guid': 'GUID',
        'display_aspect_ratio': 'displayAspectRatio',
        'audio_codec': 'audioCodec',
        'container_format': 'containerFormat'
    }

    def __init__(self, video_codec=None, name=None, description=None, guid=None, display_aspect_ratio=None, audio_codec=None, container_format=None):  # noqa: E501
        """CarbonPreset - a model defined in OpenAPI"""  # noqa: E501

        self._video_codec = None
        self._name = None
        self._description = None
        self._guid = None
        self._display_aspect_ratio = None
        self._audio_codec = None
        self._container_format = None
        self.discriminator = None

        self.video_codec = video_codec
        self.name = name
        self.description = description
        self.guid = guid
        self.display_aspect_ratio = display_aspect_ratio
        self.audio_codec = audio_codec
        self.container_format = container_format

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


        :return: The video_codec of this CarbonPreset.  # noqa: E501
        :rtype: str
        """
        return self._video_codec

    @video_codec.setter
    def video_codec(self, video_codec):
        """Sets the video_codec of this CarbonPreset.


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

        self._video_codec = video_codec

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


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

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


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

        self._name = name

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


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

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


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

        self._description = description

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


        :return: The guid of this CarbonPreset.  # noqa: E501
        :rtype: str
        """
        return self._guid

    @guid.setter
    def guid(self, guid):
        """Sets the guid of this CarbonPreset.


        :param guid: The guid of this CarbonPreset.  # noqa: E501
        :type: str
        """
        if guid is None:
            raise ValueError("Invalid value for `guid`, must not be `None`")  # noqa: E501
        if guid is not None and not re.search(r'(\{([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\})', guid):  # noqa: E501
            raise ValueError(r"Invalid value for `guid`, must be a follow pattern or equal to `/(\{([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\})/`")  # noqa: E501

        self._guid = guid

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


        :return: The display_aspect_ratio of this CarbonPreset.  # noqa: E501
        :rtype: AspectRatioType
        """
        return self._display_aspect_ratio

    @display_aspect_ratio.setter
    def display_aspect_ratio(self, display_aspect_ratio):
        """Sets the display_aspect_ratio of this CarbonPreset.


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

        self._display_aspect_ratio = display_aspect_ratio

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


        :return: The audio_codec of this CarbonPreset.  # noqa: E501
        :rtype: str
        """
        return self._audio_codec

    @audio_codec.setter
    def audio_codec(self, audio_codec):
        """Sets the audio_codec of this CarbonPreset.


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

        self._audio_codec = audio_codec

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


        :return: The container_format of this CarbonPreset.  # noqa: E501
        :rtype: str
        """
        return self._container_format

    @container_format.setter
    def container_format(self, container_format):
        """Sets the container_format of this CarbonPreset.


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

        self._container_format = container_format

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

        return self.__dict__ == other.__dict__

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