# coding: utf-8

"""
    Aron API

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

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import inspect
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class ServiceCreateAPIPayload(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 = {
        'cluster_name': 'str',
        'cluster_node_ids': 'list[int]',
        'dataset_name': 'str',
        'env_vars': 'list[ModelEnvVar]',
        'experiment_id': 'int',
        'image_url': 'str',
        'name': 'str',
        'ports': 'list[ModelServicePort]',
        'project_id': 'int',
        'resource_spec': 'ModelKernelResourceSpecField',
        'resource_spec_id': 'int',
        'service_config': 'ModelServiceConfig',
        'service_type': 'str',
        'start_command': 'str',
        'template_id': 'int',
        'volumes': 'ProtoVolumeMountRequests'
    }

    attribute_map = {
        'cluster_name': 'cluster_name',
        'cluster_node_ids': 'cluster_node_ids',
        'dataset_name': 'dataset_name',
        'env_vars': 'env_vars',
        'experiment_id': 'experiment_id',
        'image_url': 'image_url',
        'name': 'name',
        'ports': 'ports',
        'project_id': 'project_id',
        'resource_spec': 'resource_spec',
        'resource_spec_id': 'resource_spec_id',
        'service_config': 'service_config',
        'service_type': 'service_type',
        'start_command': 'start_command',
        'template_id': 'template_id',
        'volumes': 'volumes'
    }

    def __init__(self, cluster_name=None, cluster_node_ids=None, dataset_name=None, env_vars=None, experiment_id=None, image_url=None, name=None, ports=None, project_id=None, resource_spec=None, resource_spec_id=None, service_config=None, service_type=None, start_command=None, template_id=None, volumes=None, local_vars_configuration=None):  # noqa: E501
        """ServiceCreateAPIPayload - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._cluster_name = None
        self._cluster_node_ids = None
        self._dataset_name = None
        self._env_vars = None
        self._experiment_id = None
        self._image_url = None
        self._name = None
        self._ports = None
        self._project_id = None
        self._resource_spec = None
        self._resource_spec_id = None
        self._service_config = None
        self._service_type = None
        self._start_command = None
        self._template_id = None
        self._volumes = None
        self.discriminator = None

        self.cluster_name = cluster_name
        if cluster_node_ids is not None:
            self.cluster_node_ids = cluster_node_ids
        self.dataset_name = dataset_name
        if env_vars is not None:
            self.env_vars = env_vars
        self.experiment_id = experiment_id
        self.image_url = image_url
        self.name = name
        self.ports = ports
        self.project_id = project_id
        if resource_spec is not None:
            self.resource_spec = resource_spec
        self.resource_spec_id = resource_spec_id
        self.service_config = service_config
        self.service_type = service_type
        self.start_command = start_command
        if template_id is not None:
            self.template_id = template_id
        self.volumes = volumes

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


        :return: The cluster_name of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._cluster_name

    @cluster_name.setter
    def cluster_name(self, cluster_name):
        """Sets the cluster_name of this ServiceCreateAPIPayload.


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

        self._cluster_name = cluster_name

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


        :return: The cluster_node_ids of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: list[int]
        """
        return self._cluster_node_ids

    @cluster_node_ids.setter
    def cluster_node_ids(self, cluster_node_ids):
        """Sets the cluster_node_ids of this ServiceCreateAPIPayload.


        :param cluster_node_ids: The cluster_node_ids of this ServiceCreateAPIPayload.  # noqa: E501
        :type cluster_node_ids: list[int]
        """

        self._cluster_node_ids = cluster_node_ids

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


        :return: The dataset_name of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._dataset_name

    @dataset_name.setter
    def dataset_name(self, dataset_name):
        """Sets the dataset_name of this ServiceCreateAPIPayload.


        :param dataset_name: The dataset_name of this ServiceCreateAPIPayload.  # noqa: E501
        :type dataset_name: str
        """

        self._dataset_name = dataset_name

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


        :return: The env_vars of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: list[ModelEnvVar]
        """
        return self._env_vars

    @env_vars.setter
    def env_vars(self, env_vars):
        """Sets the env_vars of this ServiceCreateAPIPayload.


        :param env_vars: The env_vars of this ServiceCreateAPIPayload.  # noqa: E501
        :type env_vars: list[ModelEnvVar]
        """

        self._env_vars = env_vars

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


        :return: The experiment_id of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._experiment_id

    @experiment_id.setter
    def experiment_id(self, experiment_id):
        """Sets the experiment_id of this ServiceCreateAPIPayload.


        :param experiment_id: The experiment_id of this ServiceCreateAPIPayload.  # noqa: E501
        :type experiment_id: int
        """

        self._experiment_id = experiment_id

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


        :return: The image_url of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._image_url

    @image_url.setter
    def image_url(self, image_url):
        """Sets the image_url of this ServiceCreateAPIPayload.


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

        self._image_url = image_url

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


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

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


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

        self._name = name

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


        :return: The ports of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: list[ModelServicePort]
        """
        return self._ports

    @ports.setter
    def ports(self, ports):
        """Sets the ports of this ServiceCreateAPIPayload.


        :param ports: The ports of this ServiceCreateAPIPayload.  # noqa: E501
        :type ports: list[ModelServicePort]
        """
        if self.local_vars_configuration.client_side_validation and ports is None:  # noqa: E501
            raise ValueError("Invalid value for `ports`, must not be `None`")  # noqa: E501

        self._ports = ports

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


        :return: The project_id of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._project_id

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


        :param project_id: The project_id of this ServiceCreateAPIPayload.  # noqa: E501
        :type project_id: int
        """

        self._project_id = project_id

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


        :return: The resource_spec of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: ModelKernelResourceSpecField
        """
        return self._resource_spec

    @resource_spec.setter
    def resource_spec(self, resource_spec):
        """Sets the resource_spec of this ServiceCreateAPIPayload.


        :param resource_spec: The resource_spec of this ServiceCreateAPIPayload.  # noqa: E501
        :type resource_spec: ModelKernelResourceSpecField
        """

        self._resource_spec = resource_spec

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


        :return: The resource_spec_id of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._resource_spec_id

    @resource_spec_id.setter
    def resource_spec_id(self, resource_spec_id):
        """Sets the resource_spec_id of this ServiceCreateAPIPayload.


        :param resource_spec_id: The resource_spec_id of this ServiceCreateAPIPayload.  # noqa: E501
        :type resource_spec_id: int
        """

        self._resource_spec_id = resource_spec_id

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


        :return: The service_config of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: ModelServiceConfig
        """
        return self._service_config

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


        :param service_config: The service_config of this ServiceCreateAPIPayload.  # noqa: E501
        :type service_config: ModelServiceConfig
        """
        if self.local_vars_configuration.client_side_validation and service_config is None:  # noqa: E501
            raise ValueError("Invalid value for `service_config`, must not be `None`")  # noqa: E501

        self._service_config = service_config

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


        :return: The service_type of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._service_type

    @service_type.setter
    def service_type(self, service_type):
        """Sets the service_type of this ServiceCreateAPIPayload.


        :param service_type: The service_type of this ServiceCreateAPIPayload.  # noqa: E501
        :type service_type: str
        """
        if self.local_vars_configuration.client_side_validation and service_type is None:  # noqa: E501
            raise ValueError("Invalid value for `service_type`, must not be `None`")  # noqa: E501
        allowed_values = ["jupyterlab", "ssh", "custom"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and service_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `service_type` ({0}), must be one of {1}"  # noqa: E501
                .format(service_type, allowed_values)
            )

        self._service_type = service_type

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


        :return: The start_command of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._start_command

    @start_command.setter
    def start_command(self, start_command):
        """Sets the start_command of this ServiceCreateAPIPayload.


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

        self._start_command = start_command

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


        :return: The template_id of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._template_id

    @template_id.setter
    def template_id(self, template_id):
        """Sets the template_id of this ServiceCreateAPIPayload.


        :param template_id: The template_id of this ServiceCreateAPIPayload.  # noqa: E501
        :type template_id: int
        """

        self._template_id = template_id

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


        :return: The volumes of this ServiceCreateAPIPayload.  # noqa: E501
        :rtype: ProtoVolumeMountRequests
        """
        return self._volumes

    @volumes.setter
    def volumes(self, volumes):
        """Sets the volumes of this ServiceCreateAPIPayload.


        :param volumes: The volumes of this ServiceCreateAPIPayload.  # noqa: E501
        :type volumes: ProtoVolumeMountRequests
        """
        if self.local_vars_configuration.client_side_validation and volumes is None:  # noqa: E501
            raise ValueError("Invalid value for `volumes`, must not be `None`")  # noqa: E501

        self._volumes = volumes

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = inspect.getargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, ServiceCreateAPIPayload):
            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, ServiceCreateAPIPayload):
            return True

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