lentiq.models.eks_configuration module
# coding: utf-8 ####alex test """ """ import pprint import re # noqa: F401 import six from lentiq.models.infrastructure_provider_configuration import InfrastructureProviderConfiguration # noqa: F401,E501 class EKSConfiguration(InfrastructureProviderConfiguration): """ """ """ 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 = { 'node_count': 'int', 'node_instance_type': 'str', 'region': 'str', 'worker_volume_size_gb': 'int' } attribute_map = { 'node_count': 'nodeCount', 'node_instance_type': 'nodeInstanceType', 'region': 'region', 'worker_volume_size_gb': 'workerVolumeSizeGb' } discriminator = None def __init__(self, node_count=None, node_instance_type=None, region=None, worker_volume_size_gb=None): # noqa: E501 """EKSConfiguration - a model defined in Swagger""" # noqa: E501 self._node_count = None self._node_instance_type = None self._region = None self._worker_volume_size_gb = None if node_count is not None: self.node_count = node_count if node_instance_type is not None: self.node_instance_type = node_instance_type if region is not None: self.region = region if worker_volume_size_gb is not None: self.worker_volume_size_gb = worker_volume_size_gb @property def node_count(self): """Gets the node_count of this EKSConfiguration. # noqa: E501 :return: The node_count of this EKSConfiguration. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this EKSConfiguration. :param node_count: The node_count of this EKSConfiguration. # noqa: E501 :type: int """ self._node_count = node_count @property def node_instance_type(self): """Gets the node_instance_type of this EKSConfiguration. # noqa: E501 The instance type to be used by the worker node instances. # noqa: E501 :return: The node_instance_type of this EKSConfiguration. # noqa: E501 :rtype: str """ return self._node_instance_type @node_instance_type.setter def node_instance_type(self, node_instance_type): """Sets the node_instance_type of this EKSConfiguration. The instance type to be used by the worker node instances. # noqa: E501 :param node_instance_type: The node_instance_type of this EKSConfiguration. # noqa: E501 :type: str """ allowed_values = ["t2.xlarge", "t2.2xlarge", "t3.xlarge", "t3.2xlarge", "m3.xlarge", "m3.2xlarge", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m5.xlarge", "m5.2xlarge", "m5.4xlarge", "m5.12xlarge", "m5.24xlarge", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.xlarge", "c5.2xlarge", "c5.4xlarge", "c5.9xlarge", "c5.18xlarge", "i3.xlarge", "i3.2xlarge", "i3.4xlarge", "i3.8xlarge", "i3.16xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "r4.xlarge", "r4.2xlarge", "r4.4xlarge", "r4.8xlarge", "r4.16xlarge", "r5.xlarge", "r5.2xlarge", "r5.4xlarge", "r5.12xlarge", "r5.24xlarge", "x1.16xlarge", "x1.32xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge"] # noqa: E501 if node_instance_type not in allowed_values: raise ValueError( "Invalid value for `node_instance_type` ({0}), must be one of {1}" # noqa: E501 .format(node_instance_type, allowed_values) ) self._node_instance_type = node_instance_type @property def region(self): """Gets the region of this EKSConfiguration. # noqa: E501 Region in which the EKS cluster is provisioned. The regions are restricted due to EKS availability. # noqa: E501 :return: The region of this EKSConfiguration. # noqa: E501 :rtype: str """ return self._region @region.setter def region(self, region): """Sets the region of this EKSConfiguration. Region in which the EKS cluster is provisioned. The regions are restricted due to EKS availability. # noqa: E501 :param region: The region of this EKSConfiguration. # noqa: E501 :type: str """ allowed_values = ["us-east-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "us-east-2", "eu-central-1", "eu-north-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2"] # noqa: E501 if region not in allowed_values: raise ValueError( "Invalid value for `region` ({0}), must be one of {1}" # noqa: E501 .format(region, allowed_values) ) self._region = region @property def worker_volume_size_gb(self): """Gets the worker_volume_size_gb of this EKSConfiguration. # noqa: E501 The volume size for the disk for each worker node. # noqa: E501 :return: The worker_volume_size_gb of this EKSConfiguration. # noqa: E501 :rtype: int """ return self._worker_volume_size_gb @worker_volume_size_gb.setter def worker_volume_size_gb(self, worker_volume_size_gb): """Sets the worker_volume_size_gb of this EKSConfiguration. The volume size for the disk for each worker node. # noqa: E501 :param worker_volume_size_gb: The worker_volume_size_gb of this EKSConfiguration. # noqa: E501 :type: int """ self._worker_volume_size_gb = worker_volume_size_gb 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(EKSConfiguration, 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, EKSConfiguration): 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 EKSConfiguration
class EKSConfiguration(InfrastructureProviderConfiguration): """ """ """ 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 = { 'node_count': 'int', 'node_instance_type': 'str', 'region': 'str', 'worker_volume_size_gb': 'int' } attribute_map = { 'node_count': 'nodeCount', 'node_instance_type': 'nodeInstanceType', 'region': 'region', 'worker_volume_size_gb': 'workerVolumeSizeGb' } discriminator = None def __init__(self, node_count=None, node_instance_type=None, region=None, worker_volume_size_gb=None): # noqa: E501 """EKSConfiguration - a model defined in Swagger""" # noqa: E501 self._node_count = None self._node_instance_type = None self._region = None self._worker_volume_size_gb = None if node_count is not None: self.node_count = node_count if node_instance_type is not None: self.node_instance_type = node_instance_type if region is not None: self.region = region if worker_volume_size_gb is not None: self.worker_volume_size_gb = worker_volume_size_gb @property def node_count(self): """Gets the node_count of this EKSConfiguration. # noqa: E501 :return: The node_count of this EKSConfiguration. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this EKSConfiguration. :param node_count: The node_count of this EKSConfiguration. # noqa: E501 :type: int """ self._node_count = node_count @property def node_instance_type(self): """Gets the node_instance_type of this EKSConfiguration. # noqa: E501 The instance type to be used by the worker node instances. # noqa: E501 :return: The node_instance_type of this EKSConfiguration. # noqa: E501 :rtype: str """ return self._node_instance_type @node_instance_type.setter def node_instance_type(self, node_instance_type): """Sets the node_instance_type of this EKSConfiguration. The instance type to be used by the worker node instances. # noqa: E501 :param node_instance_type: The node_instance_type of this EKSConfiguration. # noqa: E501 :type: str """ allowed_values = ["t2.xlarge", "t2.2xlarge", "t3.xlarge", "t3.2xlarge", "m3.xlarge", "m3.2xlarge", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m5.xlarge", "m5.2xlarge", "m5.4xlarge", "m5.12xlarge", "m5.24xlarge", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.xlarge", "c5.2xlarge", "c5.4xlarge", "c5.9xlarge", "c5.18xlarge", "i3.xlarge", "i3.2xlarge", "i3.4xlarge", "i3.8xlarge", "i3.16xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "r4.xlarge", "r4.2xlarge", "r4.4xlarge", "r4.8xlarge", "r4.16xlarge", "r5.xlarge", "r5.2xlarge", "r5.4xlarge", "r5.12xlarge", "r5.24xlarge", "x1.16xlarge", "x1.32xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge"] # noqa: E501 if node_instance_type not in allowed_values: raise ValueError( "Invalid value for `node_instance_type` ({0}), must be one of {1}" # noqa: E501 .format(node_instance_type, allowed_values) ) self._node_instance_type = node_instance_type @property def region(self): """Gets the region of this EKSConfiguration. # noqa: E501 Region in which the EKS cluster is provisioned. The regions are restricted due to EKS availability. # noqa: E501 :return: The region of this EKSConfiguration. # noqa: E501 :rtype: str """ return self._region @region.setter def region(self, region): """Sets the region of this EKSConfiguration. Region in which the EKS cluster is provisioned. The regions are restricted due to EKS availability. # noqa: E501 :param region: The region of this EKSConfiguration. # noqa: E501 :type: str """ allowed_values = ["us-east-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "us-east-2", "eu-central-1", "eu-north-1", "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2"] # noqa: E501 if region not in allowed_values: raise ValueError( "Invalid value for `region` ({0}), must be one of {1}" # noqa: E501 .format(region, allowed_values) ) self._region = region @property def worker_volume_size_gb(self): """Gets the worker_volume_size_gb of this EKSConfiguration. # noqa: E501 The volume size for the disk for each worker node. # noqa: E501 :return: The worker_volume_size_gb of this EKSConfiguration. # noqa: E501 :rtype: int """ return self._worker_volume_size_gb @worker_volume_size_gb.setter def worker_volume_size_gb(self, worker_volume_size_gb): """Sets the worker_volume_size_gb of this EKSConfiguration. The volume size for the disk for each worker node. # noqa: E501 :param worker_volume_size_gb: The worker_volume_size_gb of this EKSConfiguration. # noqa: E501 :type: int """ self._worker_volume_size_gb = worker_volume_size_gb 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(EKSConfiguration, 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, EKSConfiguration): 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)
- EKSConfiguration
- lentiq.models.infrastructure_provider_configuration.InfrastructureProviderConfiguration
- builtins.object
Class variables
var attribute_map
var discriminator
var discriminator_value_class_map
var swagger_types
Static methods
def __init__(
self, node_count=None, node_instance_type=None, region=None, worker_volume_size_gb=None)
EKSConfiguration - a model defined in Swagger
def __init__(self, node_count=None, node_instance_type=None, region=None, worker_volume_size_gb=None): # noqa: E501 """EKSConfiguration - a model defined in Swagger""" # noqa: E501 self._node_count = None self._node_instance_type = None self._region = None self._worker_volume_size_gb = None if node_count is not None: self.node_count = node_count if node_instance_type is not None: self.node_instance_type = node_instance_type if region is not None: self.region = region if worker_volume_size_gb is not None: self.worker_volume_size_gb = worker_volume_size_gb
def get_real_child_model(
self, data)
Returns the real base class specified by the discriminator
def get_real_child_model(self, data): """Returns the real base class specified by the discriminator""" discriminator_value = data[self.discriminator] #.lower() return self.discriminator_value_class_map.get(discriminator_value)
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(EKSConfiguration, 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 infrastructure_provider
Gets the infrastructure_provider of this InfrastructureProviderConfiguration. # noqa: E501
:return: The infrastructure_provider of this InfrastructureProviderConfiguration. # noqa: E501 :rtype: str
var node_count
Gets the node_count of this EKSConfiguration. # noqa: E501
:return: The node_count of this EKSConfiguration. # noqa: E501 :rtype: int
var node_instance_type
Gets the node_instance_type of this EKSConfiguration. # noqa: E501
The instance type to be used by the worker node instances. # noqa: E501
:return: The node_instance_type of this EKSConfiguration. # noqa: E501 :rtype: str
var region
Gets the region of this EKSConfiguration. # noqa: E501
Region in which the EKS cluster is provisioned. The regions are restricted due to EKS availability. # noqa: E501
:return: The region of this EKSConfiguration. # noqa: E501 :rtype: str
var worker_volume_size_gb
Gets the worker_volume_size_gb of this EKSConfiguration. # noqa: E501
The volume size for the disk for each worker node. # noqa: E501
:return: The worker_volume_size_gb of this EKSConfiguration. # noqa: E501 :rtype: int