lentiq.models.container module
# coding: utf-8 ####alex test """ """ import pprint import re # noqa: F401 import six from lentiq.models.env_var import EnvVar # noqa: F401,E501 from lentiq.models.resource_requirements import ResourceRequirements # noqa: F401,E501 class Container(object): """ """ """ 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 = { 'arguments': 'list[str]', 'command': 'list[str]', 'env': 'list[EnvVar]', 'image': 'str', 'image_pull_policy': 'str', 'resources': 'ResourceRequirements', 'working_dir': 'str' } attribute_map = { 'arguments': 'arguments', 'command': 'command', 'env': 'env', 'image': 'image', 'image_pull_policy': 'imagePullPolicy', 'resources': 'resources', 'working_dir': 'workingDir' } discriminator = None def __init__(self, arguments=None, command=None, env=None, image=None, image_pull_policy=None, resources=None, working_dir=None): # noqa: E501 """Container - a model defined in Swagger""" # noqa: E501 self._arguments = None self._command = None self._env = None self._image = None self._image_pull_policy = None self._resources = None self._working_dir = None if arguments is not None: self.arguments = arguments if command is not None: self.command = command if env is not None: self.env = env if image is not None: self.image = image if image_pull_policy is not None: self.image_pull_policy = image_pull_policy if resources is not None: self.resources = resources if working_dir is not None: self.working_dir = working_dir @property def arguments(self): """Gets the arguments of this Container. # noqa: E501 :return: The arguments of this Container. # noqa: E501 :rtype: list[str] """ return self._arguments @arguments.setter def arguments(self, arguments): """Sets the arguments of this Container. :param arguments: The arguments of this Container. # noqa: E501 :type: list[str] """ self._arguments = arguments @property def command(self): """Gets the command of this Container. # noqa: E501 :return: The command of this Container. # noqa: E501 :rtype: list[str] """ return self._command @command.setter def command(self, command): """Sets the command of this Container. :param command: The command of this Container. # noqa: E501 :type: list[str] """ self._command = command @property def env(self): """Gets the env of this Container. # noqa: E501 :return: The env of this Container. # noqa: E501 :rtype: list[EnvVar] """ return self._env @env.setter def env(self, env): """Sets the env of this Container. :param env: The env of this Container. # noqa: E501 :type: list[EnvVar] """ self._env = env @property def image(self): """Gets the image of this Container. # noqa: E501 :return: The image of this Container. # noqa: E501 :rtype: str """ return self._image @image.setter def image(self, image): """Sets the image of this Container. :param image: The image of this Container. # noqa: E501 :type: str """ self._image = image @property def image_pull_policy(self): """Gets the image_pull_policy of this Container. # noqa: E501 :return: The image_pull_policy of this Container. # noqa: E501 :rtype: str """ return self._image_pull_policy @image_pull_policy.setter def image_pull_policy(self, image_pull_policy): """Sets the image_pull_policy of this Container. :param image_pull_policy: The image_pull_policy of this Container. # noqa: E501 :type: str """ allowed_values = ["Always", "Never", "IfNotPresent"] # noqa: E501 if image_pull_policy not in allowed_values: raise ValueError( "Invalid value for `image_pull_policy` ({0}), must be one of {1}" # noqa: E501 .format(image_pull_policy, allowed_values) ) self._image_pull_policy = image_pull_policy @property def resources(self): """Gets the resources of this Container. # noqa: E501 :return: The resources of this Container. # noqa: E501 :rtype: ResourceRequirements """ return self._resources @resources.setter def resources(self, resources): """Sets the resources of this Container. :param resources: The resources of this Container. # noqa: E501 :type: ResourceRequirements """ self._resources = resources @property def working_dir(self): """Gets the working_dir of this Container. # noqa: E501 :return: The working_dir of this Container. # noqa: E501 :rtype: str """ return self._working_dir @working_dir.setter def working_dir(self, working_dir): """Sets the working_dir of this Container. :param working_dir: The working_dir of this Container. # noqa: E501 :type: str """ self._working_dir = working_dir 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(Container, 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, Container): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Classes
class Container
class Container(object): """ """ """ 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 = { 'arguments': 'list[str]', 'command': 'list[str]', 'env': 'list[EnvVar]', 'image': 'str', 'image_pull_policy': 'str', 'resources': 'ResourceRequirements', 'working_dir': 'str' } attribute_map = { 'arguments': 'arguments', 'command': 'command', 'env': 'env', 'image': 'image', 'image_pull_policy': 'imagePullPolicy', 'resources': 'resources', 'working_dir': 'workingDir' } discriminator = None def __init__(self, arguments=None, command=None, env=None, image=None, image_pull_policy=None, resources=None, working_dir=None): # noqa: E501 """Container - a model defined in Swagger""" # noqa: E501 self._arguments = None self._command = None self._env = None self._image = None self._image_pull_policy = None self._resources = None self._working_dir = None if arguments is not None: self.arguments = arguments if command is not None: self.command = command if env is not None: self.env = env if image is not None: self.image = image if image_pull_policy is not None: self.image_pull_policy = image_pull_policy if resources is not None: self.resources = resources if working_dir is not None: self.working_dir = working_dir @property def arguments(self): """Gets the arguments of this Container. # noqa: E501 :return: The arguments of this Container. # noqa: E501 :rtype: list[str] """ return self._arguments @arguments.setter def arguments(self, arguments): """Sets the arguments of this Container. :param arguments: The arguments of this Container. # noqa: E501 :type: list[str] """ self._arguments = arguments @property def command(self): """Gets the command of this Container. # noqa: E501 :return: The command of this Container. # noqa: E501 :rtype: list[str] """ return self._command @command.setter def command(self, command): """Sets the command of this Container. :param command: The command of this Container. # noqa: E501 :type: list[str] """ self._command = command @property def env(self): """Gets the env of this Container. # noqa: E501 :return: The env of this Container. # noqa: E501 :rtype: list[EnvVar] """ return self._env @env.setter def env(self, env): """Sets the env of this Container. :param env: The env of this Container. # noqa: E501 :type: list[EnvVar] """ self._env = env @property def image(self): """Gets the image of this Container. # noqa: E501 :return: The image of this Container. # noqa: E501 :rtype: str """ return self._image @image.setter def image(self, image): """Sets the image of this Container. :param image: The image of this Container. # noqa: E501 :type: str """ self._image = image @property def image_pull_policy(self): """Gets the image_pull_policy of this Container. # noqa: E501 :return: The image_pull_policy of this Container. # noqa: E501 :rtype: str """ return self._image_pull_policy @image_pull_policy.setter def image_pull_policy(self, image_pull_policy): """Sets the image_pull_policy of this Container. :param image_pull_policy: The image_pull_policy of this Container. # noqa: E501 :type: str """ allowed_values = ["Always", "Never", "IfNotPresent"] # noqa: E501 if image_pull_policy not in allowed_values: raise ValueError( "Invalid value for `image_pull_policy` ({0}), must be one of {1}" # noqa: E501 .format(image_pull_policy, allowed_values) ) self._image_pull_policy = image_pull_policy @property def resources(self): """Gets the resources of this Container. # noqa: E501 :return: The resources of this Container. # noqa: E501 :rtype: ResourceRequirements """ return self._resources @resources.setter def resources(self, resources): """Sets the resources of this Container. :param resources: The resources of this Container. # noqa: E501 :type: ResourceRequirements """ self._resources = resources @property def working_dir(self): """Gets the working_dir of this Container. # noqa: E501 :return: The working_dir of this Container. # noqa: E501 :rtype: str """ return self._working_dir @working_dir.setter def working_dir(self, working_dir): """Sets the working_dir of this Container. :param working_dir: The working_dir of this Container. # noqa: E501 :type: str """ self._working_dir = working_dir 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(Container, 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, Container): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Ancestors (in MRO)
- Container
- builtins.object
Class variables
var attribute_map
var discriminator
var swagger_types
Static methods
def __init__(
self, arguments=None, command=None, env=None, image=None, image_pull_policy=None, resources=None, working_dir=None)
Container - a model defined in Swagger
def __init__(self, arguments=None, command=None, env=None, image=None, image_pull_policy=None, resources=None, working_dir=None): # noqa: E501 """Container - a model defined in Swagger""" # noqa: E501 self._arguments = None self._command = None self._env = None self._image = None self._image_pull_policy = None self._resources = None self._working_dir = None if arguments is not None: self.arguments = arguments if command is not None: self.command = command if env is not None: self.env = env if image is not None: self.image = image if image_pull_policy is not None: self.image_pull_policy = image_pull_policy if resources is not None: self.resources = resources if working_dir is not None: self.working_dir = working_dir
def to_dict(
self)
Returns the model properties as a dict
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(Container, dict): for key, value in self.items(): result[key] = value return result
def to_str(
self)
Returns the string representation of the model
def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict())
Instance variables
var arguments
Gets the arguments of this Container. # noqa: E501
:return: The arguments of this Container. # noqa: E501 :rtype: list[str]
var command
Gets the command of this Container. # noqa: E501
:return: The command of this Container. # noqa: E501 :rtype: list[str]
var env
Gets the env of this Container. # noqa: E501
:return: The env of this Container. # noqa: E501 :rtype: list[EnvVar]
var image
Gets the image of this Container. # noqa: E501
:return: The image of this Container. # noqa: E501 :rtype: str
var image_pull_policy
Gets the image_pull_policy of this Container. # noqa: E501
:return: The image_pull_policy of this Container. # noqa: E501 :rtype: str
var resources
Gets the resources of this Container. # noqa: E501
:return: The resources of this Container. # noqa: E501 :rtype: ResourceRequirements
var working_dir
Gets the working_dir of this Container. # noqa: E501
:return: The working_dir of this Container. # noqa: E501 :rtype: str