# coding: utf-8

"""
    vod20250101

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

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


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class VolumeForStartExecutionInput(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 = {
        'integrated_loudness': 'float',
        'loudness_range': 'float',
        'method': 'str',
        'true_peak': 'float'
    }

    attribute_map = {
        'integrated_loudness': 'IntegratedLoudness',
        'loudness_range': 'LoudnessRange',
        'method': 'Method',
        'true_peak': 'TruePeak'
    }

    def __init__(self, integrated_loudness=None, loudness_range=None, method=None, true_peak=None, _configuration=None):  # noqa: E501
        """VolumeForStartExecutionInput - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._integrated_loudness = None
        self._loudness_range = None
        self._method = None
        self._true_peak = None
        self.discriminator = None

        if integrated_loudness is not None:
            self.integrated_loudness = integrated_loudness
        if loudness_range is not None:
            self.loudness_range = loudness_range
        if method is not None:
            self.method = method
        if true_peak is not None:
            self.true_peak = true_peak

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


        :return: The integrated_loudness of this VolumeForStartExecutionInput.  # noqa: E501
        :rtype: float
        """
        return self._integrated_loudness

    @integrated_loudness.setter
    def integrated_loudness(self, integrated_loudness):
        """Sets the integrated_loudness of this VolumeForStartExecutionInput.


        :param integrated_loudness: The integrated_loudness of this VolumeForStartExecutionInput.  # noqa: E501
        :type: float
        """
        if (self._configuration.client_side_validation and
                integrated_loudness is not None and integrated_loudness > -5):  # noqa: E501
            raise ValueError("Invalid value for `integrated_loudness`, must be a value less than or equal to `-5`")  # noqa: E501
        if (self._configuration.client_side_validation and
                integrated_loudness is not None and integrated_loudness < -70):  # noqa: E501
            raise ValueError("Invalid value for `integrated_loudness`, must be a value greater than or equal to `-70`")  # noqa: E501

        self._integrated_loudness = integrated_loudness

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


        :return: The loudness_range of this VolumeForStartExecutionInput.  # noqa: E501
        :rtype: float
        """
        return self._loudness_range

    @loudness_range.setter
    def loudness_range(self, loudness_range):
        """Sets the loudness_range of this VolumeForStartExecutionInput.


        :param loudness_range: The loudness_range of this VolumeForStartExecutionInput.  # noqa: E501
        :type: float
        """
        if (self._configuration.client_side_validation and
                loudness_range is not None and loudness_range > 20):  # noqa: E501
            raise ValueError("Invalid value for `loudness_range`, must be a value less than or equal to `20`")  # noqa: E501
        if (self._configuration.client_side_validation and
                loudness_range is not None and loudness_range < 1):  # noqa: E501
            raise ValueError("Invalid value for `loudness_range`, must be a value greater than or equal to `1`")  # noqa: E501

        self._loudness_range = loudness_range

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


        :return: The method of this VolumeForStartExecutionInput.  # noqa: E501
        :rtype: str
        """
        return self._method

    @method.setter
    def method(self, method):
        """Sets the method of this VolumeForStartExecutionInput.


        :param method: The method of this VolumeForStartExecutionInput.  # noqa: E501
        :type: str
        """
        allowed_values = ["2Pass"]  # noqa: E501
        if (self._configuration.client_side_validation and
                method not in allowed_values):
            raise ValueError(
                "Invalid value for `method` ({0}), must be one of {1}"  # noqa: E501
                .format(method, allowed_values)
            )

        self._method = method

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


        :return: The true_peak of this VolumeForStartExecutionInput.  # noqa: E501
        :rtype: float
        """
        return self._true_peak

    @true_peak.setter
    def true_peak(self, true_peak):
        """Sets the true_peak of this VolumeForStartExecutionInput.


        :param true_peak: The true_peak of this VolumeForStartExecutionInput.  # noqa: E501
        :type: float
        """
        if (self._configuration.client_side_validation and
                true_peak is not None and true_peak > 0):  # noqa: E501
            raise ValueError("Invalid value for `true_peak`, must be a value less than or equal to `0`")  # noqa: E501
        if (self._configuration.client_side_validation and
                true_peak is not None and true_peak < -9):  # noqa: E501
            raise ValueError("Invalid value for `true_peak`, must be a value greater than or equal to `-9`")  # noqa: E501

        self._true_peak = true_peak

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

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