# coding: utf-8

"""
    bmq

    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 CreateInstanceRequest(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 = {
        'auto_renew': 'bool',
        'billing_period': 'str',
        'billing_type': 'str',
        'description': 'str',
        'eip_id': 'str',
        'message_retention': 'int',
        'name': 'str',
        'project_name': 'str',
        'security_group_id_list': 'list[str]',
        'specification': 'str',
        'subnet_id_list': 'list[str]',
        'times': 'int',
        'vpc_id': 'str',
        'zone_id_list': 'list[str]'
    }

    attribute_map = {
        'auto_renew': 'AutoRenew',
        'billing_period': 'BillingPeriod',
        'billing_type': 'BillingType',
        'description': 'Description',
        'eip_id': 'EipId',
        'message_retention': 'MessageRetention',
        'name': 'Name',
        'project_name': 'ProjectName',
        'security_group_id_list': 'SecurityGroupIdList',
        'specification': 'Specification',
        'subnet_id_list': 'SubnetIdList',
        'times': 'Times',
        'vpc_id': 'VpcId',
        'zone_id_list': 'ZoneIdList'
    }

    def __init__(self, auto_renew=None, billing_period=None, billing_type=None, description=None, eip_id=None, message_retention=None, name=None, project_name=None, security_group_id_list=None, specification=None, subnet_id_list=None, times=None, vpc_id=None, zone_id_list=None, _configuration=None):  # noqa: E501
        """CreateInstanceRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._auto_renew = None
        self._billing_period = None
        self._billing_type = None
        self._description = None
        self._eip_id = None
        self._message_retention = None
        self._name = None
        self._project_name = None
        self._security_group_id_list = None
        self._specification = None
        self._subnet_id_list = None
        self._times = None
        self._vpc_id = None
        self._zone_id_list = None
        self.discriminator = None

        if auto_renew is not None:
            self.auto_renew = auto_renew
        if billing_period is not None:
            self.billing_period = billing_period
        self.billing_type = billing_type
        if description is not None:
            self.description = description
        if eip_id is not None:
            self.eip_id = eip_id
        if message_retention is not None:
            self.message_retention = message_retention
        self.name = name
        if project_name is not None:
            self.project_name = project_name
        if security_group_id_list is not None:
            self.security_group_id_list = security_group_id_list
        self.specification = specification
        if subnet_id_list is not None:
            self.subnet_id_list = subnet_id_list
        if times is not None:
            self.times = times
        self.vpc_id = vpc_id
        if zone_id_list is not None:
            self.zone_id_list = zone_id_list

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


        :return: The auto_renew of this CreateInstanceRequest.  # noqa: E501
        :rtype: bool
        """
        return self._auto_renew

    @auto_renew.setter
    def auto_renew(self, auto_renew):
        """Sets the auto_renew of this CreateInstanceRequest.


        :param auto_renew: The auto_renew of this CreateInstanceRequest.  # noqa: E501
        :type: bool
        """

        self._auto_renew = auto_renew

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


        :return: The billing_period of this CreateInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._billing_period

    @billing_period.setter
    def billing_period(self, billing_period):
        """Sets the billing_period of this CreateInstanceRequest.


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

        self._billing_period = billing_period

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


        :return: The billing_type of this CreateInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._billing_type

    @billing_type.setter
    def billing_type(self, billing_type):
        """Sets the billing_type of this CreateInstanceRequest.


        :param billing_type: The billing_type of this CreateInstanceRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and billing_type is None:
            raise ValueError("Invalid value for `billing_type`, must not be `None`")  # noqa: E501
        allowed_values = ["MIX", "POST", "PRE"]  # noqa: E501
        if (self._configuration.client_side_validation and
                billing_type not in allowed_values):
            raise ValueError(
                "Invalid value for `billing_type` ({0}), must be one of {1}"  # noqa: E501
                .format(billing_type, allowed_values)
            )

        self._billing_type = billing_type

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


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

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


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

        self._description = description

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


        :return: The eip_id of this CreateInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._eip_id

    @eip_id.setter
    def eip_id(self, eip_id):
        """Sets the eip_id of this CreateInstanceRequest.


        :param eip_id: The eip_id of this CreateInstanceRequest.  # noqa: E501
        :type: str
        """

        self._eip_id = eip_id

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


        :return: The message_retention of this CreateInstanceRequest.  # noqa: E501
        :rtype: int
        """
        return self._message_retention

    @message_retention.setter
    def message_retention(self, message_retention):
        """Sets the message_retention of this CreateInstanceRequest.


        :param message_retention: The message_retention of this CreateInstanceRequest.  # noqa: E501
        :type: int
        """
        if (self._configuration.client_side_validation and
                message_retention is not None and message_retention > 336):  # noqa: E501
            raise ValueError("Invalid value for `message_retention`, must be a value less than or equal to `336`")  # noqa: E501

        self._message_retention = message_retention

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


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

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


        :param name: The name of this CreateInstanceRequest.  # 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
        if (self._configuration.client_side_validation and
                name is not None and len(name) > 128):
            raise ValueError("Invalid value for `name`, length must be less than or equal to `128`")  # noqa: E501
        if (self._configuration.client_side_validation and
                name is not None and len(name) < 3):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `3`")  # noqa: E501

        self._name = name

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


        :return: The project_name of this CreateInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this CreateInstanceRequest.


        :param project_name: The project_name of this CreateInstanceRequest.  # noqa: E501
        :type: str
        """

        self._project_name = project_name

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


        :return: The security_group_id_list of this CreateInstanceRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._security_group_id_list

    @security_group_id_list.setter
    def security_group_id_list(self, security_group_id_list):
        """Sets the security_group_id_list of this CreateInstanceRequest.


        :param security_group_id_list: The security_group_id_list of this CreateInstanceRequest.  # noqa: E501
        :type: list[str]
        """

        self._security_group_id_list = security_group_id_list

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


        :return: The specification of this CreateInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._specification

    @specification.setter
    def specification(self, specification):
        """Sets the specification of this CreateInstanceRequest.


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

        self._specification = specification

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


        :return: The subnet_id_list of this CreateInstanceRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._subnet_id_list

    @subnet_id_list.setter
    def subnet_id_list(self, subnet_id_list):
        """Sets the subnet_id_list of this CreateInstanceRequest.


        :param subnet_id_list: The subnet_id_list of this CreateInstanceRequest.  # noqa: E501
        :type: list[str]
        """

        self._subnet_id_list = subnet_id_list

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


        :return: The times of this CreateInstanceRequest.  # noqa: E501
        :rtype: int
        """
        return self._times

    @times.setter
    def times(self, times):
        """Sets the times of this CreateInstanceRequest.


        :param times: The times of this CreateInstanceRequest.  # noqa: E501
        :type: int
        """

        self._times = times

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


        :return: The vpc_id of this CreateInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._vpc_id

    @vpc_id.setter
    def vpc_id(self, vpc_id):
        """Sets the vpc_id of this CreateInstanceRequest.


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

        self._vpc_id = vpc_id

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


        :return: The zone_id_list of this CreateInstanceRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._zone_id_list

    @zone_id_list.setter
    def zone_id_list(self, zone_id_list):
        """Sets the zone_id_list of this CreateInstanceRequest.


        :param zone_id_list: The zone_id_list of this CreateInstanceRequest.  # noqa: E501
        :type: list[str]
        """

        self._zone_id_list = zone_id_list

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

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