# coding: utf-8

"""
    vei_api

    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 CreateModelServiceRequest(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 = {
        'compression': 'bool',
        'cpu_count': 'int',
        'cpu_limit': 'float',
        'cpu_request': 'float',
        'deploy_config': 'DeployConfigForCreateModelServiceInput',
        'dynamic_batching': 'bool',
        'gpu_count': 'int',
        'grpc_port': 'int',
        'http_mem_limit_unit': 'str',
        'http_mem_req_unit': 'str',
        'json_parameter': 'str',
        'max_batch_size': 'int',
        'max_queue_delay_microseconds': 'int',
        'mem_limit': 'int',
        'model_id': 'str',
        'model_name': 'str',
        'model_service_name': 'str',
        'open_ai_api': 'OpenAiApiForCreateModelServiceInput',
        'port': 'int',
        'process_id': 'str',
        'process_name': 'str',
        'project_id': 'str',
        'project_name': 'str',
        'replicas': 'int',
        'service_config': 'list[ServiceConfigForCreateModelServiceInput]',
        'shared_memory': 'SharedMemoryForCreateModelServiceInput',
        'state_type': 'int',
        'version_id': 'str',
        'version_name': 'str'
    }

    attribute_map = {
        'compression': 'compression',
        'cpu_count': 'cpu_count',
        'cpu_limit': 'cpu_limit',
        'cpu_request': 'cpu_request',
        'deploy_config': 'deploy_config',
        'dynamic_batching': 'dynamic_batching',
        'gpu_count': 'gpu_count',
        'grpc_port': 'grpc_port',
        'http_mem_limit_unit': 'http_mem_limit_unit',
        'http_mem_req_unit': 'http_mem_req_unit',
        'json_parameter': 'json_parameter',
        'max_batch_size': 'max_batch_size',
        'max_queue_delay_microseconds': 'max_queue_delay_microseconds',
        'mem_limit': 'mem_limit',
        'model_id': 'model_id',
        'model_name': 'model_name',
        'model_service_name': 'model_service_name',
        'open_ai_api': 'open_ai_api',
        'port': 'port',
        'process_id': 'process_id',
        'process_name': 'process_name',
        'project_id': 'project_id',
        'project_name': 'project_name',
        'replicas': 'replicas',
        'service_config': 'service_config',
        'shared_memory': 'shared_memory',
        'state_type': 'state_type',
        'version_id': 'version_id',
        'version_name': 'version_name'
    }

    def __init__(self, compression=None, cpu_count=None, cpu_limit=None, cpu_request=None, deploy_config=None, dynamic_batching=None, gpu_count=None, grpc_port=None, http_mem_limit_unit=None, http_mem_req_unit=None, json_parameter=None, max_batch_size=None, max_queue_delay_microseconds=None, mem_limit=None, model_id=None, model_name=None, model_service_name=None, open_ai_api=None, port=None, process_id=None, process_name=None, project_id=None, project_name=None, replicas=None, service_config=None, shared_memory=None, state_type=None, version_id=None, version_name=None, _configuration=None):  # noqa: E501
        """CreateModelServiceRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._compression = None
        self._cpu_count = None
        self._cpu_limit = None
        self._cpu_request = None
        self._deploy_config = None
        self._dynamic_batching = None
        self._gpu_count = None
        self._grpc_port = None
        self._http_mem_limit_unit = None
        self._http_mem_req_unit = None
        self._json_parameter = None
        self._max_batch_size = None
        self._max_queue_delay_microseconds = None
        self._mem_limit = None
        self._model_id = None
        self._model_name = None
        self._model_service_name = None
        self._open_ai_api = None
        self._port = None
        self._process_id = None
        self._process_name = None
        self._project_id = None
        self._project_name = None
        self._replicas = None
        self._service_config = None
        self._shared_memory = None
        self._state_type = None
        self._version_id = None
        self._version_name = None
        self.discriminator = None

        if compression is not None:
            self.compression = compression
        if cpu_count is not None:
            self.cpu_count = cpu_count
        if cpu_limit is not None:
            self.cpu_limit = cpu_limit
        if cpu_request is not None:
            self.cpu_request = cpu_request
        if deploy_config is not None:
            self.deploy_config = deploy_config
        if dynamic_batching is not None:
            self.dynamic_batching = dynamic_batching
        if gpu_count is not None:
            self.gpu_count = gpu_count
        if grpc_port is not None:
            self.grpc_port = grpc_port
        if http_mem_limit_unit is not None:
            self.http_mem_limit_unit = http_mem_limit_unit
        if http_mem_req_unit is not None:
            self.http_mem_req_unit = http_mem_req_unit
        if json_parameter is not None:
            self.json_parameter = json_parameter
        if max_batch_size is not None:
            self.max_batch_size = max_batch_size
        if max_queue_delay_microseconds is not None:
            self.max_queue_delay_microseconds = max_queue_delay_microseconds
        if mem_limit is not None:
            self.mem_limit = mem_limit
        if model_id is not None:
            self.model_id = model_id
        if model_name is not None:
            self.model_name = model_name
        if model_service_name is not None:
            self.model_service_name = model_service_name
        if open_ai_api is not None:
            self.open_ai_api = open_ai_api
        if port is not None:
            self.port = port
        if process_id is not None:
            self.process_id = process_id
        if process_name is not None:
            self.process_name = process_name
        self.project_id = project_id
        if project_name is not None:
            self.project_name = project_name
        if replicas is not None:
            self.replicas = replicas
        if service_config is not None:
            self.service_config = service_config
        if shared_memory is not None:
            self.shared_memory = shared_memory
        if state_type is not None:
            self.state_type = state_type
        if version_id is not None:
            self.version_id = version_id
        if version_name is not None:
            self.version_name = version_name

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


        :return: The compression of this CreateModelServiceRequest.  # noqa: E501
        :rtype: bool
        """
        return self._compression

    @compression.setter
    def compression(self, compression):
        """Sets the compression of this CreateModelServiceRequest.


        :param compression: The compression of this CreateModelServiceRequest.  # noqa: E501
        :type: bool
        """

        self._compression = compression

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


        :return: The cpu_count of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._cpu_count

    @cpu_count.setter
    def cpu_count(self, cpu_count):
        """Sets the cpu_count of this CreateModelServiceRequest.


        :param cpu_count: The cpu_count of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._cpu_count = cpu_count

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


        :return: The cpu_limit of this CreateModelServiceRequest.  # noqa: E501
        :rtype: float
        """
        return self._cpu_limit

    @cpu_limit.setter
    def cpu_limit(self, cpu_limit):
        """Sets the cpu_limit of this CreateModelServiceRequest.


        :param cpu_limit: The cpu_limit of this CreateModelServiceRequest.  # noqa: E501
        :type: float
        """

        self._cpu_limit = cpu_limit

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


        :return: The cpu_request of this CreateModelServiceRequest.  # noqa: E501
        :rtype: float
        """
        return self._cpu_request

    @cpu_request.setter
    def cpu_request(self, cpu_request):
        """Sets the cpu_request of this CreateModelServiceRequest.


        :param cpu_request: The cpu_request of this CreateModelServiceRequest.  # noqa: E501
        :type: float
        """

        self._cpu_request = cpu_request

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


        :return: The deploy_config of this CreateModelServiceRequest.  # noqa: E501
        :rtype: DeployConfigForCreateModelServiceInput
        """
        return self._deploy_config

    @deploy_config.setter
    def deploy_config(self, deploy_config):
        """Sets the deploy_config of this CreateModelServiceRequest.


        :param deploy_config: The deploy_config of this CreateModelServiceRequest.  # noqa: E501
        :type: DeployConfigForCreateModelServiceInput
        """

        self._deploy_config = deploy_config

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


        :return: The dynamic_batching of this CreateModelServiceRequest.  # noqa: E501
        :rtype: bool
        """
        return self._dynamic_batching

    @dynamic_batching.setter
    def dynamic_batching(self, dynamic_batching):
        """Sets the dynamic_batching of this CreateModelServiceRequest.


        :param dynamic_batching: The dynamic_batching of this CreateModelServiceRequest.  # noqa: E501
        :type: bool
        """

        self._dynamic_batching = dynamic_batching

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


        :return: The gpu_count of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._gpu_count

    @gpu_count.setter
    def gpu_count(self, gpu_count):
        """Sets the gpu_count of this CreateModelServiceRequest.


        :param gpu_count: The gpu_count of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._gpu_count = gpu_count

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


        :return: The grpc_port of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._grpc_port

    @grpc_port.setter
    def grpc_port(self, grpc_port):
        """Sets the grpc_port of this CreateModelServiceRequest.


        :param grpc_port: The grpc_port of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._grpc_port = grpc_port

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


        :return: The http_mem_limit_unit of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._http_mem_limit_unit

    @http_mem_limit_unit.setter
    def http_mem_limit_unit(self, http_mem_limit_unit):
        """Sets the http_mem_limit_unit of this CreateModelServiceRequest.


        :param http_mem_limit_unit: The http_mem_limit_unit of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._http_mem_limit_unit = http_mem_limit_unit

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


        :return: The http_mem_req_unit of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._http_mem_req_unit

    @http_mem_req_unit.setter
    def http_mem_req_unit(self, http_mem_req_unit):
        """Sets the http_mem_req_unit of this CreateModelServiceRequest.


        :param http_mem_req_unit: The http_mem_req_unit of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._http_mem_req_unit = http_mem_req_unit

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


        :return: The json_parameter of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._json_parameter

    @json_parameter.setter
    def json_parameter(self, json_parameter):
        """Sets the json_parameter of this CreateModelServiceRequest.


        :param json_parameter: The json_parameter of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._json_parameter = json_parameter

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


        :return: The max_batch_size of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._max_batch_size

    @max_batch_size.setter
    def max_batch_size(self, max_batch_size):
        """Sets the max_batch_size of this CreateModelServiceRequest.


        :param max_batch_size: The max_batch_size of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._max_batch_size = max_batch_size

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


        :return: The max_queue_delay_microseconds of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._max_queue_delay_microseconds

    @max_queue_delay_microseconds.setter
    def max_queue_delay_microseconds(self, max_queue_delay_microseconds):
        """Sets the max_queue_delay_microseconds of this CreateModelServiceRequest.


        :param max_queue_delay_microseconds: The max_queue_delay_microseconds of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._max_queue_delay_microseconds = max_queue_delay_microseconds

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


        :return: The mem_limit of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._mem_limit

    @mem_limit.setter
    def mem_limit(self, mem_limit):
        """Sets the mem_limit of this CreateModelServiceRequest.


        :param mem_limit: The mem_limit of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._mem_limit = mem_limit

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


        :return: The model_id of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._model_id

    @model_id.setter
    def model_id(self, model_id):
        """Sets the model_id of this CreateModelServiceRequest.


        :param model_id: The model_id of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._model_id = model_id

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


        :return: The model_name of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._model_name

    @model_name.setter
    def model_name(self, model_name):
        """Sets the model_name of this CreateModelServiceRequest.


        :param model_name: The model_name of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._model_name = model_name

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


        :return: The model_service_name of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._model_service_name

    @model_service_name.setter
    def model_service_name(self, model_service_name):
        """Sets the model_service_name of this CreateModelServiceRequest.


        :param model_service_name: The model_service_name of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._model_service_name = model_service_name

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


        :return: The open_ai_api of this CreateModelServiceRequest.  # noqa: E501
        :rtype: OpenAiApiForCreateModelServiceInput
        """
        return self._open_ai_api

    @open_ai_api.setter
    def open_ai_api(self, open_ai_api):
        """Sets the open_ai_api of this CreateModelServiceRequest.


        :param open_ai_api: The open_ai_api of this CreateModelServiceRequest.  # noqa: E501
        :type: OpenAiApiForCreateModelServiceInput
        """

        self._open_ai_api = open_ai_api

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


        :return: The port of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """Sets the port of this CreateModelServiceRequest.


        :param port: The port of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._port = port

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


        :return: The process_id of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._process_id

    @process_id.setter
    def process_id(self, process_id):
        """Sets the process_id of this CreateModelServiceRequest.


        :param process_id: The process_id of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._process_id = process_id

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


        :return: The process_name of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._process_name

    @process_name.setter
    def process_name(self, process_name):
        """Sets the process_name of this CreateModelServiceRequest.


        :param process_name: The process_name of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._process_name = process_name

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


        :return: The project_id of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this CreateModelServiceRequest.


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

        self._project_id = project_id

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


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

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


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

        self._project_name = project_name

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


        :return: The replicas of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._replicas

    @replicas.setter
    def replicas(self, replicas):
        """Sets the replicas of this CreateModelServiceRequest.


        :param replicas: The replicas of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._replicas = replicas

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


        :return: The service_config of this CreateModelServiceRequest.  # noqa: E501
        :rtype: list[ServiceConfigForCreateModelServiceInput]
        """
        return self._service_config

    @service_config.setter
    def service_config(self, service_config):
        """Sets the service_config of this CreateModelServiceRequest.


        :param service_config: The service_config of this CreateModelServiceRequest.  # noqa: E501
        :type: list[ServiceConfigForCreateModelServiceInput]
        """

        self._service_config = service_config

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


        :return: The shared_memory of this CreateModelServiceRequest.  # noqa: E501
        :rtype: SharedMemoryForCreateModelServiceInput
        """
        return self._shared_memory

    @shared_memory.setter
    def shared_memory(self, shared_memory):
        """Sets the shared_memory of this CreateModelServiceRequest.


        :param shared_memory: The shared_memory of this CreateModelServiceRequest.  # noqa: E501
        :type: SharedMemoryForCreateModelServiceInput
        """

        self._shared_memory = shared_memory

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


        :return: The state_type of this CreateModelServiceRequest.  # noqa: E501
        :rtype: int
        """
        return self._state_type

    @state_type.setter
    def state_type(self, state_type):
        """Sets the state_type of this CreateModelServiceRequest.


        :param state_type: The state_type of this CreateModelServiceRequest.  # noqa: E501
        :type: int
        """

        self._state_type = state_type

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


        :return: The version_id of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._version_id

    @version_id.setter
    def version_id(self, version_id):
        """Sets the version_id of this CreateModelServiceRequest.


        :param version_id: The version_id of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._version_id = version_id

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


        :return: The version_name of this CreateModelServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._version_name

    @version_name.setter
    def version_name(self, version_name):
        """Sets the version_name of this CreateModelServiceRequest.


        :param version_name: The version_name of this CreateModelServiceRequest.  # noqa: E501
        :type: str
        """

        self._version_name = version_name

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

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