lentiq.models.gke_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 GKEConfiguration(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 = { 'boot_disk_size_gb': 'int', 'node_count': 'int', 'node_instance_type': 'str', 'zone': 'str' } attribute_map = { 'boot_disk_size_gb': 'bootDiskSizeGb', 'node_count': 'nodeCount', 'node_instance_type': 'nodeInstanceType', 'zone': 'zone' } discriminator = None def __init__(self, boot_disk_size_gb=None, node_count=None, node_instance_type=None, zone=None): # noqa: E501 """GKEConfiguration - a model defined in Swagger""" # noqa: E501 self._boot_disk_size_gb = None self._node_count = None self._node_instance_type = None self._zone = None if boot_disk_size_gb is not None: self.boot_disk_size_gb = boot_disk_size_gb 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 zone is not None: self.zone = zone @property def boot_disk_size_gb(self): """Gets the boot_disk_size_gb of this GKEConfiguration. # noqa: E501 The size of the boot disk for the nodes. # noqa: E501 :return: The boot_disk_size_gb of this GKEConfiguration. # noqa: E501 :rtype: int """ return self._boot_disk_size_gb @boot_disk_size_gb.setter def boot_disk_size_gb(self, boot_disk_size_gb): """Sets the boot_disk_size_gb of this GKEConfiguration. The size of the boot disk for the nodes. # noqa: E501 :param boot_disk_size_gb: The boot_disk_size_gb of this GKEConfiguration. # noqa: E501 :type: int """ self._boot_disk_size_gb = boot_disk_size_gb @property def node_count(self): """Gets the node_count of this GKEConfiguration. # noqa: E501 :return: The node_count of this GKEConfiguration. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this GKEConfiguration. :param node_count: The node_count of this GKEConfiguration. # noqa: E501 :type: int """ self._node_count = node_count @property def node_instance_type(self): """Gets the node_instance_type of this GKEConfiguration. # noqa: E501 The instance type to be used by the worker node instances. # noqa: E501 :return: The node_instance_type of this GKEConfiguration. # 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 GKEConfiguration. The instance type to be used by the worker node instances. # noqa: E501 :param node_instance_type: The node_instance_type of this GKEConfiguration. # noqa: E501 :type: str """ allowed_values = ["n1-standard-4", "n1-standard-8", "n1-standard-16", "n1-standard-32", "n1-standard-64", "n1-standard-96", "n1-highmem-4", "n1-highmem-8", "n1-highmem-16", "n1-highmem-32", "n1-highmem-64", "n1-highmem-96", "n1-highcpu-4", "n1-highcpu-8", "n1-highcpu-16", "n1-highcpu-32", "n1-highcpu-64", "n1-highcpu-96", "n1-ultramem-40", "n1-ultramem-80", "n1-megamem-96", "n1-ultramem-160"] # 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 zone(self): """Gets the zone of this GKEConfiguration. # noqa: E501 The zone in which the cluster is provisioned. # noqa: E501 :return: The zone of this GKEConfiguration. # noqa: E501 :rtype: str """ return self._zone @zone.setter def zone(self, zone): """Sets the zone of this GKEConfiguration. The zone in which the cluster is provisioned. # noqa: E501 :param zone: The zone of this GKEConfiguration. # noqa: E501 :type: str """ allowed_values = ["asia-east1-a", "asia-east1-b", "asia-east1-c", "asia-east2-a", "asia-east2-b", "asia-east2-c", "asia-northeast1-a", "asia-northeast1-b", "asia-northeast1-c", "asia-south1-a", "asia-south1-b", "asia-south1-c", "asia-southeast1-a", "asia-southeast1-c", "australia-southeast1-a", "australia-southeast1-b", "australia-southeast1-c", "europe-north1-a", "europe-north1-b", "europe-north1-c", "europe-west1-b", "europe-west1-c", "europe-west1-d", "europe-west2-a", "europe-west2-b", "europe-west2-c", "europe-west3-a", "europe-west3-b", "europe-west3-c", "europe-west4-a", "europe-west4-b", "europe-west4-c", "northamerica-northeast1-a", "northamerica-northeast1-b", "northamerica-northeast1-c", "southamerica-east1-a", "southamerica-east1-b", "southamerica-east1-c", "us-central1-a", "us-central1-b", "us-central1-c", "us-central1-f", "us-east1-b", "us-east1-c", "us-east1-d", "us-east4-a", "us-east4-b", "us-east4-c", "us-west1-a", "us-west1-b", "us-west1-c", "us-west2-a", "us-west2-b", "us-west2-c"] # noqa: E501 if zone not in allowed_values: raise ValueError( "Invalid value for `zone` ({0}), must be one of {1}" # noqa: E501 .format(zone, allowed_values) ) self._zone = zone 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(GKEConfiguration, 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, GKEConfiguration): 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 GKEConfiguration
class GKEConfiguration(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 = { 'boot_disk_size_gb': 'int', 'node_count': 'int', 'node_instance_type': 'str', 'zone': 'str' } attribute_map = { 'boot_disk_size_gb': 'bootDiskSizeGb', 'node_count': 'nodeCount', 'node_instance_type': 'nodeInstanceType', 'zone': 'zone' } discriminator = None def __init__(self, boot_disk_size_gb=None, node_count=None, node_instance_type=None, zone=None): # noqa: E501 """GKEConfiguration - a model defined in Swagger""" # noqa: E501 self._boot_disk_size_gb = None self._node_count = None self._node_instance_type = None self._zone = None if boot_disk_size_gb is not None: self.boot_disk_size_gb = boot_disk_size_gb 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 zone is not None: self.zone = zone @property def boot_disk_size_gb(self): """Gets the boot_disk_size_gb of this GKEConfiguration. # noqa: E501 The size of the boot disk for the nodes. # noqa: E501 :return: The boot_disk_size_gb of this GKEConfiguration. # noqa: E501 :rtype: int """ return self._boot_disk_size_gb @boot_disk_size_gb.setter def boot_disk_size_gb(self, boot_disk_size_gb): """Sets the boot_disk_size_gb of this GKEConfiguration. The size of the boot disk for the nodes. # noqa: E501 :param boot_disk_size_gb: The boot_disk_size_gb of this GKEConfiguration. # noqa: E501 :type: int """ self._boot_disk_size_gb = boot_disk_size_gb @property def node_count(self): """Gets the node_count of this GKEConfiguration. # noqa: E501 :return: The node_count of this GKEConfiguration. # noqa: E501 :rtype: int """ return self._node_count @node_count.setter def node_count(self, node_count): """Sets the node_count of this GKEConfiguration. :param node_count: The node_count of this GKEConfiguration. # noqa: E501 :type: int """ self._node_count = node_count @property def node_instance_type(self): """Gets the node_instance_type of this GKEConfiguration. # noqa: E501 The instance type to be used by the worker node instances. # noqa: E501 :return: The node_instance_type of this GKEConfiguration. # 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 GKEConfiguration. The instance type to be used by the worker node instances. # noqa: E501 :param node_instance_type: The node_instance_type of this GKEConfiguration. # noqa: E501 :type: str """ allowed_values = ["n1-standard-4", "n1-standard-8", "n1-standard-16", "n1-standard-32", "n1-standard-64", "n1-standard-96", "n1-highmem-4", "n1-highmem-8", "n1-highmem-16", "n1-highmem-32", "n1-highmem-64", "n1-highmem-96", "n1-highcpu-4", "n1-highcpu-8", "n1-highcpu-16", "n1-highcpu-32", "n1-highcpu-64", "n1-highcpu-96", "n1-ultramem-40", "n1-ultramem-80", "n1-megamem-96", "n1-ultramem-160"] # 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 zone(self): """Gets the zone of this GKEConfiguration. # noqa: E501 The zone in which the cluster is provisioned. # noqa: E501 :return: The zone of this GKEConfiguration. # noqa: E501 :rtype: str """ return self._zone @zone.setter def zone(self, zone): """Sets the zone of this GKEConfiguration. The zone in which the cluster is provisioned. # noqa: E501 :param zone: The zone of this GKEConfiguration. # noqa: E501 :type: str """ allowed_values = ["asia-east1-a", "asia-east1-b", "asia-east1-c", "asia-east2-a", "asia-east2-b", "asia-east2-c", "asia-northeast1-a", "asia-northeast1-b", "asia-northeast1-c", "asia-south1-a", "asia-south1-b", "asia-south1-c", "asia-southeast1-a", "asia-southeast1-c", "australia-southeast1-a", "australia-southeast1-b", "australia-southeast1-c", "europe-north1-a", "europe-north1-b", "europe-north1-c", "europe-west1-b", "europe-west1-c", "europe-west1-d", "europe-west2-a", "europe-west2-b", "europe-west2-c", "europe-west3-a", "europe-west3-b", "europe-west3-c", "europe-west4-a", "europe-west4-b", "europe-west4-c", "northamerica-northeast1-a", "northamerica-northeast1-b", "northamerica-northeast1-c", "southamerica-east1-a", "southamerica-east1-b", "southamerica-east1-c", "us-central1-a", "us-central1-b", "us-central1-c", "us-central1-f", "us-east1-b", "us-east1-c", "us-east1-d", "us-east4-a", "us-east4-b", "us-east4-c", "us-west1-a", "us-west1-b", "us-west1-c", "us-west2-a", "us-west2-b", "us-west2-c"] # noqa: E501 if zone not in allowed_values: raise ValueError( "Invalid value for `zone` ({0}), must be one of {1}" # noqa: E501 .format(zone, allowed_values) ) self._zone = zone 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(GKEConfiguration, 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, GKEConfiguration): 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)
- GKEConfiguration
- 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, boot_disk_size_gb=None, node_count=None, node_instance_type=None, zone=None)
GKEConfiguration - a model defined in Swagger
def __init__(self, boot_disk_size_gb=None, node_count=None, node_instance_type=None, zone=None): # noqa: E501 """GKEConfiguration - a model defined in Swagger""" # noqa: E501 self._boot_disk_size_gb = None self._node_count = None self._node_instance_type = None self._zone = None if boot_disk_size_gb is not None: self.boot_disk_size_gb = boot_disk_size_gb 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 zone is not None: self.zone = zone
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(GKEConfiguration, 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 boot_disk_size_gb
Gets the boot_disk_size_gb of this GKEConfiguration. # noqa: E501
The size of the boot disk for the nodes. # noqa: E501
:return: The boot_disk_size_gb of this GKEConfiguration. # noqa: E501 :rtype: int
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 GKEConfiguration. # noqa: E501
:return: The node_count of this GKEConfiguration. # noqa: E501 :rtype: int
var node_instance_type
Gets the node_instance_type of this GKEConfiguration. # noqa: E501
The instance type to be used by the worker node instances. # noqa: E501
:return: The node_instance_type of this GKEConfiguration. # noqa: E501 :rtype: str
var zone
Gets the zone of this GKEConfiguration. # noqa: E501
The zone in which the cluster is provisioned. # noqa: E501
:return: The zone of this GKEConfiguration. # noqa: E501 :rtype: str