# coding: utf-8

"""
    MEC Sandbox API

    The MEC Sandbox API described using OpenAPI  # noqa: E501

    OpenAPI spec version: 0.0.9
    Contact: cti_support@etsi.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Process(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 = {
        'id': 'str',
        'name': 'str',
        'type': 'str',
        'is_external': 'bool',
        'image': 'str',
        'environment': 'str',
        'command_arguments': 'str',
        'command_exe': 'str',
        'service_config': 'ServiceConfig',
        'gpu_config': 'GpuConfig',
        'memory_config': 'MemoryConfig',
        'cpu_config': 'CpuConfig',
        'external_config': 'ExternalConfig',
        'status': 'str',
        'user_chart_location': 'str',
        'user_chart_alternate_values': 'str',
        'user_chart_group': 'str',
        'meta': 'dict(str, str)',
        'user_meta': 'dict(str, str)',
        'net_char': 'NetworkCharacteristics',
        'app_latency': 'int',
        'app_latency_variation': 'int',
        'app_throughput': 'int',
        'app_packet_loss': 'float',
        'placement_id': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'type': 'type',
        'is_external': 'isExternal',
        'image': 'image',
        'environment': 'environment',
        'command_arguments': 'commandArguments',
        'command_exe': 'commandExe',
        'service_config': 'serviceConfig',
        'gpu_config': 'gpuConfig',
        'memory_config': 'memoryConfig',
        'cpu_config': 'cpuConfig',
        'external_config': 'externalConfig',
        'status': 'status',
        'user_chart_location': 'userChartLocation',
        'user_chart_alternate_values': 'userChartAlternateValues',
        'user_chart_group': 'userChartGroup',
        'meta': 'meta',
        'user_meta': 'userMeta',
        'net_char': 'netChar',
        'app_latency': 'appLatency',
        'app_latency_variation': 'appLatencyVariation',
        'app_throughput': 'appThroughput',
        'app_packet_loss': 'appPacketLoss',
        'placement_id': 'placementId'
    }

    def __init__(self, id=None, name=None, type=None, is_external=None, image=None, environment=None, command_arguments=None, command_exe=None, service_config=None, gpu_config=None, memory_config=None, cpu_config=None, external_config=None, status=None, user_chart_location=None, user_chart_alternate_values=None, user_chart_group=None, meta=None, user_meta=None, net_char=None, app_latency=None, app_latency_variation=None, app_throughput=None, app_packet_loss=None, placement_id=None):  # noqa: E501
        """Process - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._type = None
        self._is_external = None
        self._image = None
        self._environment = None
        self._command_arguments = None
        self._command_exe = None
        self._service_config = None
        self._gpu_config = None
        self._memory_config = None
        self._cpu_config = None
        self._external_config = None
        self._status = None
        self._user_chart_location = None
        self._user_chart_alternate_values = None
        self._user_chart_group = None
        self._meta = None
        self._user_meta = None
        self._net_char = None
        self._app_latency = None
        self._app_latency_variation = None
        self._app_throughput = None
        self._app_packet_loss = None
        self._placement_id = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if type is not None:
            self.type = type
        if is_external is not None:
            self.is_external = is_external
        if image is not None:
            self.image = image
        if environment is not None:
            self.environment = environment
        if command_arguments is not None:
            self.command_arguments = command_arguments
        if command_exe is not None:
            self.command_exe = command_exe
        if service_config is not None:
            self.service_config = service_config
        if gpu_config is not None:
            self.gpu_config = gpu_config
        if memory_config is not None:
            self.memory_config = memory_config
        if cpu_config is not None:
            self.cpu_config = cpu_config
        if external_config is not None:
            self.external_config = external_config
        if status is not None:
            self.status = status
        if user_chart_location is not None:
            self.user_chart_location = user_chart_location
        if user_chart_alternate_values is not None:
            self.user_chart_alternate_values = user_chart_alternate_values
        if user_chart_group is not None:
            self.user_chart_group = user_chart_group
        if meta is not None:
            self.meta = meta
        if user_meta is not None:
            self.user_meta = user_meta
        if net_char is not None:
            self.net_char = net_char
        if app_latency is not None:
            self.app_latency = app_latency
        if app_latency_variation is not None:
            self.app_latency_variation = app_latency_variation
        if app_throughput is not None:
            self.app_throughput = app_throughput
        if app_packet_loss is not None:
            self.app_packet_loss = app_packet_loss
        if placement_id is not None:
            self.placement_id = placement_id

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

        Unique process ID  # noqa: E501

        :return: The id of this Process.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Process.

        Unique process ID  # noqa: E501

        :param id: The id of this Process.  # noqa: E501
        :type: str
        """

        self._id = id

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

        Process name  # noqa: E501

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

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

        Process name  # noqa: E501

        :param name: The name of this Process.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Process type  # noqa: E501

        :return: The type of this Process.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Process.

        Process type  # noqa: E501

        :param type: The type of this Process.  # noqa: E501
        :type: str
        """
        allowed_values = ["UE-APP", "EDGE-APP", "MEC-SVC", "CLOUD-APP"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        true: process is external to MEEP false: process is internal to MEEP  # noqa: E501

        :return: The is_external of this Process.  # noqa: E501
        :rtype: bool
        """
        return self._is_external

    @is_external.setter
    def is_external(self, is_external):
        """Sets the is_external of this Process.

        true: process is external to MEEP false: process is internal to MEEP  # noqa: E501

        :param is_external: The is_external of this Process.  # noqa: E501
        :type: bool
        """

        self._is_external = is_external

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

        Docker image to deploy inside MEEP  # noqa: E501

        :return: The image of this Process.  # noqa: E501
        :rtype: str
        """
        return self._image

    @image.setter
    def image(self, image):
        """Sets the image of this Process.

        Docker image to deploy inside MEEP  # noqa: E501

        :param image: The image of this Process.  # noqa: E501
        :type: str
        """

        self._image = image

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

        Environment variables using the format NAME=\"value\",NAME=\"value\",NAME=\"value\"  # noqa: E501

        :return: The environment of this Process.  # noqa: E501
        :rtype: str
        """
        return self._environment

    @environment.setter
    def environment(self, environment):
        """Sets the environment of this Process.

        Environment variables using the format NAME=\"value\",NAME=\"value\",NAME=\"value\"  # noqa: E501

        :param environment: The environment of this Process.  # noqa: E501
        :type: str
        """

        self._environment = environment

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

        Arguments to command executable  # noqa: E501

        :return: The command_arguments of this Process.  # noqa: E501
        :rtype: str
        """
        return self._command_arguments

    @command_arguments.setter
    def command_arguments(self, command_arguments):
        """Sets the command_arguments of this Process.

        Arguments to command executable  # noqa: E501

        :param command_arguments: The command_arguments of this Process.  # noqa: E501
        :type: str
        """

        self._command_arguments = command_arguments

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

        Executable to invoke at container start up  # noqa: E501

        :return: The command_exe of this Process.  # noqa: E501
        :rtype: str
        """
        return self._command_exe

    @command_exe.setter
    def command_exe(self, command_exe):
        """Sets the command_exe of this Process.

        Executable to invoke at container start up  # noqa: E501

        :param command_exe: The command_exe of this Process.  # noqa: E501
        :type: str
        """

        self._command_exe = command_exe

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


        :return: The service_config of this Process.  # noqa: E501
        :rtype: ServiceConfig
        """
        return self._service_config

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


        :param service_config: The service_config of this Process.  # noqa: E501
        :type: ServiceConfig
        """

        self._service_config = service_config

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


        :return: The gpu_config of this Process.  # noqa: E501
        :rtype: GpuConfig
        """
        return self._gpu_config

    @gpu_config.setter
    def gpu_config(self, gpu_config):
        """Sets the gpu_config of this Process.


        :param gpu_config: The gpu_config of this Process.  # noqa: E501
        :type: GpuConfig
        """

        self._gpu_config = gpu_config

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


        :return: The memory_config of this Process.  # noqa: E501
        :rtype: MemoryConfig
        """
        return self._memory_config

    @memory_config.setter
    def memory_config(self, memory_config):
        """Sets the memory_config of this Process.


        :param memory_config: The memory_config of this Process.  # noqa: E501
        :type: MemoryConfig
        """

        self._memory_config = memory_config

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


        :return: The cpu_config of this Process.  # noqa: E501
        :rtype: CpuConfig
        """
        return self._cpu_config

    @cpu_config.setter
    def cpu_config(self, cpu_config):
        """Sets the cpu_config of this Process.


        :param cpu_config: The cpu_config of this Process.  # noqa: E501
        :type: CpuConfig
        """

        self._cpu_config = cpu_config

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


        :return: The external_config of this Process.  # noqa: E501
        :rtype: ExternalConfig
        """
        return self._external_config

    @external_config.setter
    def external_config(self, external_config):
        """Sets the external_config of this Process.


        :param external_config: The external_config of this Process.  # noqa: E501
        :type: ExternalConfig
        """

        self._external_config = external_config

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

        Process status  # noqa: E501

        :return: The status of this Process.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Process.

        Process status  # noqa: E501

        :param status: The status of this Process.  # noqa: E501
        :type: str
        """

        self._status = status

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

        Chart location for the deployment of the chart provided by the user  # noqa: E501

        :return: The user_chart_location of this Process.  # noqa: E501
        :rtype: str
        """
        return self._user_chart_location

    @user_chart_location.setter
    def user_chart_location(self, user_chart_location):
        """Sets the user_chart_location of this Process.

        Chart location for the deployment of the chart provided by the user  # noqa: E501

        :param user_chart_location: The user_chart_location of this Process.  # noqa: E501
        :type: str
        """

        self._user_chart_location = user_chart_location

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

        Chart values.yaml file location for the deployment of the chart provided by the user  # noqa: E501

        :return: The user_chart_alternate_values of this Process.  # noqa: E501
        :rtype: str
        """
        return self._user_chart_alternate_values

    @user_chart_alternate_values.setter
    def user_chart_alternate_values(self, user_chart_alternate_values):
        """Sets the user_chart_alternate_values of this Process.

        Chart values.yaml file location for the deployment of the chart provided by the user  # noqa: E501

        :param user_chart_alternate_values: The user_chart_alternate_values of this Process.  # noqa: E501
        :type: str
        """

        self._user_chart_alternate_values = user_chart_alternate_values

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

        Chart supplemental information related to the group (service)  # noqa: E501

        :return: The user_chart_group of this Process.  # noqa: E501
        :rtype: str
        """
        return self._user_chart_group

    @user_chart_group.setter
    def user_chart_group(self, user_chart_group):
        """Sets the user_chart_group of this Process.

        Chart supplemental information related to the group (service)  # noqa: E501

        :param user_chart_group: The user_chart_group of this Process.  # noqa: E501
        :type: str
        """

        self._user_chart_group = user_chart_group

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

        Key/Value Pair Map (string, string)  # noqa: E501

        :return: The meta of this Process.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this Process.

        Key/Value Pair Map (string, string)  # noqa: E501

        :param meta: The meta of this Process.  # noqa: E501
        :type: dict(str, str)
        """

        self._meta = meta

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

        Key/Value Pair Map (string, string)  # noqa: E501

        :return: The user_meta of this Process.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._user_meta

    @user_meta.setter
    def user_meta(self, user_meta):
        """Sets the user_meta of this Process.

        Key/Value Pair Map (string, string)  # noqa: E501

        :param user_meta: The user_meta of this Process.  # noqa: E501
        :type: dict(str, str)
        """

        self._user_meta = user_meta

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


        :return: The net_char of this Process.  # noqa: E501
        :rtype: NetworkCharacteristics
        """
        return self._net_char

    @net_char.setter
    def net_char(self, net_char):
        """Sets the net_char of this Process.


        :param net_char: The net_char of this Process.  # noqa: E501
        :type: NetworkCharacteristics
        """

        self._net_char = net_char

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

        **DEPRECATED** As of release 1.5.0, replaced by netChar latency  # noqa: E501

        :return: The app_latency of this Process.  # noqa: E501
        :rtype: int
        """
        return self._app_latency

    @app_latency.setter
    def app_latency(self, app_latency):
        """Sets the app_latency of this Process.

        **DEPRECATED** As of release 1.5.0, replaced by netChar latency  # noqa: E501

        :param app_latency: The app_latency of this Process.  # noqa: E501
        :type: int
        """

        self._app_latency = app_latency

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

        **DEPRECATED** As of release 1.5.0, replaced by netChar latencyVariation  # noqa: E501

        :return: The app_latency_variation of this Process.  # noqa: E501
        :rtype: int
        """
        return self._app_latency_variation

    @app_latency_variation.setter
    def app_latency_variation(self, app_latency_variation):
        """Sets the app_latency_variation of this Process.

        **DEPRECATED** As of release 1.5.0, replaced by netChar latencyVariation  # noqa: E501

        :param app_latency_variation: The app_latency_variation of this Process.  # noqa: E501
        :type: int
        """

        self._app_latency_variation = app_latency_variation

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

        **DEPRECATED** As of release 1.5.0, replaced by netChar throughputUl and throughputDl  # noqa: E501

        :return: The app_throughput of this Process.  # noqa: E501
        :rtype: int
        """
        return self._app_throughput

    @app_throughput.setter
    def app_throughput(self, app_throughput):
        """Sets the app_throughput of this Process.

        **DEPRECATED** As of release 1.5.0, replaced by netChar throughputUl and throughputDl  # noqa: E501

        :param app_throughput: The app_throughput of this Process.  # noqa: E501
        :type: int
        """

        self._app_throughput = app_throughput

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

        **DEPRECATED** As of release 1.5.0, replaced by netChar packetLoss  # noqa: E501

        :return: The app_packet_loss of this Process.  # noqa: E501
        :rtype: float
        """
        return self._app_packet_loss

    @app_packet_loss.setter
    def app_packet_loss(self, app_packet_loss):
        """Sets the app_packet_loss of this Process.

        **DEPRECATED** As of release 1.5.0, replaced by netChar packetLoss  # noqa: E501

        :param app_packet_loss: The app_packet_loss of this Process.  # noqa: E501
        :type: float
        """

        self._app_packet_loss = app_packet_loss

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

        Identifier used for process placement in AdvantEDGE cluster  # noqa: E501

        :return: The placement_id of this Process.  # noqa: E501
        :rtype: str
        """
        return self._placement_id

    @placement_id.setter
    def placement_id(self, placement_id):
        """Sets the placement_id of this Process.

        Identifier used for process placement in AdvantEDGE cluster  # noqa: E501

        :param placement_id: The placement_id of this Process.  # noqa: E501
        :type: str
        """

        self._placement_id = placement_id

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

        return self.__dict__ == other.__dict__

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