# 
# Generated by the nebius.base.protos.compiler.  DO NOT EDIT!
# 

"""Auto-generated Nebius SDK package for ``nebius.msp.v1alpha1.resource``"""

import builtins as builtins
import collections.abc as abc
import google.protobuf.descriptor as descriptor_1
import google.protobuf.message as message_1
import nebius.api.nebius.msp.v1alpha1.resource.template_pb2 as template_pb2
import nebius.base.protos.descriptor as descriptor
import nebius.base.protos.pb_classes as pb_classes
import nebius.base.protos.unset as unset
#@ local imports here @#

# file: nebius/msp/v1alpha1/resource/template.proto
class Template(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.Template
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.Template",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        status: "TemplateStatus|template_pb2.TemplateStatus|None|unset.UnsetType" = unset.Unset,
        spec: "TemplateSpec|template_pb2.TemplateSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(status, unset.UnsetType):
            self.status = status
        if not isinstance(spec, unset.UnsetType):
            self.spec = spec
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "status",
            "spec",
        ]
    
    @builtins.property
    def status(self) -> "TemplateStatus":
        return super()._get_field("status", explicit_presence=False,
        wrap=TemplateStatus,
        )
    @status.setter
    def status(self, value: "TemplateStatus|template_pb2.TemplateStatus|None") -> None:
        return super()._set_field("status",value,explicit_presence=False,
        )
    
    @builtins.property
    def spec(self) -> "TemplateSpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=TemplateSpec,
        )
    @spec.setter
    def spec(self, value: "TemplateSpec|template_pb2.TemplateSpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "status":"status",
        "spec":"spec",
    }
    
class TemplateStatus(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.TemplateStatus
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.TemplateStatus",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        preset_details: "PresetDetails|template_pb2.PresetDetails|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(preset_details, unset.UnsetType):
            self.preset_details = preset_details
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "preset_details",
        ]
    
    @builtins.property
    def preset_details(self) -> "PresetDetails":
        return super()._get_field("preset_details", explicit_presence=False,
        wrap=PresetDetails,
        )
    @preset_details.setter
    def preset_details(self, value: "PresetDetails|template_pb2.PresetDetails|None") -> None:
        return super()._set_field("preset_details",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "preset_details":"preset_details",
    }
    
class TemplateSpec(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.TemplateSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.TemplateSpec",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        resources: "ResourcesSpec|template_pb2.ResourcesSpec|None|unset.UnsetType" = unset.Unset,
        hosts: "Host|template_pb2.Host|None|unset.UnsetType" = unset.Unset,
        disk: "Disk|template_pb2.Disk|None|unset.UnsetType" = unset.Unset,
        role: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(resources, unset.UnsetType):
            self.resources = resources
        if not isinstance(hosts, unset.UnsetType):
            self.hosts = hosts
        if not isinstance(disk, unset.UnsetType):
            self.disk = disk
        if not isinstance(role, unset.UnsetType):
            self.role = role
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "resources",
            "hosts",
            "disk",
            "role",
        ]
    
    @builtins.property
    def resources(self) -> "ResourcesSpec":
        return super()._get_field("resources", explicit_presence=False,
        wrap=ResourcesSpec,
        )
    @resources.setter
    def resources(self, value: "ResourcesSpec|template_pb2.ResourcesSpec|None") -> None:
        return super()._set_field("resources",value,explicit_presence=False,
        )
    
    @builtins.property
    def hosts(self) -> "Host":
        return super()._get_field("hosts", explicit_presence=False,
        wrap=Host,
        )
    @hosts.setter
    def hosts(self, value: "Host|template_pb2.Host|None") -> None:
        return super()._set_field("hosts",value,explicit_presence=False,
        )
    
    @builtins.property
    def disk(self) -> "Disk":
        return super()._get_field("disk", explicit_presence=False,
        wrap=Disk,
        )
    @disk.setter
    def disk(self, value: "Disk|template_pb2.Disk|None") -> None:
        return super()._set_field("disk",value,explicit_presence=False,
        )
    
    @builtins.property
    def role(self) -> "builtins.str":
        return super()._get_field("role", explicit_presence=False,
        )
    @role.setter
    def role(self, value: "builtins.str|None") -> None:
        return super()._set_field("role",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "resources":"resources",
        "hosts":"hosts",
        "disk":"disk",
        "role":"role",
    }
    
class ResourcesSpec(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.ResourcesSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.ResourcesSpec",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        platform: "builtins.str|None|unset.UnsetType" = unset.Unset,
        preset: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(platform, unset.UnsetType):
            self.platform = platform
        if not isinstance(preset, unset.UnsetType):
            self.preset = preset
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "platform",
            "preset",
        ]
    
    @builtins.property
    def platform(self) -> "builtins.str":
        return super()._get_field("platform", explicit_presence=False,
        )
    @platform.setter
    def platform(self, value: "builtins.str|None") -> None:
        return super()._set_field("platform",value,explicit_presence=False,
        )
    
    @builtins.property
    def preset(self) -> "builtins.str":
        return super()._get_field("preset", explicit_presence=False,
        )
    @preset.setter
    def preset(self, value: "builtins.str|None") -> None:
        return super()._set_field("preset",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "platform":"platform",
        "preset":"preset",
    }
    
class PresetDetails(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.PresetDetails
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.PresetDetails",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        cpu_count: "builtins.int|None|unset.UnsetType" = unset.Unset,
        memory_gibibytes: "builtins.int|None|unset.UnsetType" = unset.Unset,
        gpu_count: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(cpu_count, unset.UnsetType):
            self.cpu_count = cpu_count
        if not isinstance(memory_gibibytes, unset.UnsetType):
            self.memory_gibibytes = memory_gibibytes
        if not isinstance(gpu_count, unset.UnsetType):
            self.gpu_count = gpu_count
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "cpu_count",
            "memory_gibibytes",
            "gpu_count",
        ]
    
    @builtins.property
    def cpu_count(self) -> "builtins.int":
        return super()._get_field("cpu_count", explicit_presence=False,
        )
    @cpu_count.setter
    def cpu_count(self, value: "builtins.int|None") -> None:
        return super()._set_field("cpu_count",value,explicit_presence=False,
        )
    
    @builtins.property
    def memory_gibibytes(self) -> "builtins.int":
        return super()._get_field("memory_gibibytes", explicit_presence=False,
        )
    @memory_gibibytes.setter
    def memory_gibibytes(self, value: "builtins.int|None") -> None:
        return super()._set_field("memory_gibibytes",value,explicit_presence=False,
        )
    
    @builtins.property
    def gpu_count(self) -> "builtins.int":
        return super()._get_field("gpu_count", explicit_presence=False,
        )
    @gpu_count.setter
    def gpu_count(self, value: "builtins.int|None") -> None:
        return super()._set_field("gpu_count",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "cpu_count":"cpu_count",
        "memory_gibibytes":"memory_gibibytes",
        "gpu_count":"gpu_count",
    }
    
class Range(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.Range
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.Range",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        min: "builtins.int|None|unset.UnsetType" = unset.Unset,
        max: "builtins.int|None|unset.UnsetType" = unset.Unset,
        step: "builtins.int|None|unset.UnsetType" = unset.Unset,
        value: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(min, unset.UnsetType):
            self.min = min
        if not isinstance(max, unset.UnsetType):
            self.max = max
        if not isinstance(step, unset.UnsetType):
            self.step = step
        if not isinstance(value, unset.UnsetType):
            self.value = value
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "min",
            "max",
            "step",
            "value",
        ]
    
    @builtins.property
    def min(self) -> "builtins.int":
        return super()._get_field("min", explicit_presence=False,
        )
    @min.setter
    def min(self, value: "builtins.int|None") -> None:
        return super()._set_field("min",value,explicit_presence=False,
        )
    
    @builtins.property
    def max(self) -> "builtins.int":
        return super()._get_field("max", explicit_presence=False,
        )
    @max.setter
    def max(self, value: "builtins.int|None") -> None:
        return super()._set_field("max",value,explicit_presence=False,
        )
    
    @builtins.property
    def step(self) -> "builtins.int":
        """
        step 0 is no step validation
        """
        
        return super()._get_field("step", explicit_presence=False,
        )
    @step.setter
    def step(self, value: "builtins.int|None") -> None:
        return super()._set_field("step",value,explicit_presence=False,
        )
    
    @builtins.property
    def value(self) -> "builtins.int":
        return super()._get_field("value", explicit_presence=False,
        )
    @value.setter
    def value(self, value: "builtins.int|None") -> None:
        return super()._set_field("value",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "min":"min",
        "max":"max",
        "step":"step",
        "value":"value",
    }
    
class Disk(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.Disk
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.Disk",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        type: "builtins.str|None|unset.UnsetType" = unset.Unset,
        size_gibibytes: "Range|template_pb2.Range|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(type, unset.UnsetType):
            self.type = type
        if not isinstance(size_gibibytes, unset.UnsetType):
            self.size_gibibytes = size_gibibytes
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "type",
            "size_gibibytes",
        ]
    
    @builtins.property
    def type(self) -> "builtins.str":
        return super()._get_field("type", explicit_presence=False,
        )
    @type.setter
    def type(self, value: "builtins.str|None") -> None:
        return super()._set_field("type",value,explicit_presence=False,
        )
    
    @builtins.property
    def size_gibibytes(self) -> "Range":
        return super()._get_field("size_gibibytes", explicit_presence=False,
        wrap=Range,
        )
    @size_gibibytes.setter
    def size_gibibytes(self, value: "Range|template_pb2.Range|None") -> None:
        return super()._set_field("size_gibibytes",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "type":"type",
        "size_gibibytes":"size_gibibytes",
    }
    
class DiskSpec(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.DiskSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.DiskSpec",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        type: "builtins.str|None|unset.UnsetType" = unset.Unset,
        size_gibibytes: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(type, unset.UnsetType):
            self.type = type
        if not isinstance(size_gibibytes, unset.UnsetType):
            self.size_gibibytes = size_gibibytes
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "type",
            "size_gibibytes",
        ]
    
    @builtins.property
    def type(self) -> "builtins.str":
        return super()._get_field("type", explicit_presence=False,
        )
    @type.setter
    def type(self, value: "builtins.str|None") -> None:
        return super()._set_field("type",value,explicit_presence=False,
        )
    
    @builtins.property
    def size_gibibytes(self) -> "builtins.int":
        return super()._get_field("size_gibibytes", explicit_presence=False,
        )
    @size_gibibytes.setter
    def size_gibibytes(self, value: "builtins.int|None") -> None:
        return super()._set_field("size_gibibytes",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "type":"type",
        "size_gibibytes":"size_gibibytes",
    }
    
class Host(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.Host
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.Host",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        count: "Range|template_pb2.Range|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(count, unset.UnsetType):
            self.count = count
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "count",
        ]
    
    @builtins.property
    def count(self) -> "Range":
        return super()._get_field("count", explicit_presence=False,
        wrap=Range,
        )
    @count.setter
    def count(self, value: "Range|template_pb2.Range|None") -> None:
        return super()._set_field("count",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "count":"count",
    }
    
class HostSpec(pb_classes.Message):
    __PB2_CLASS__ = template_pb2.HostSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.HostSpec",template_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        count: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(count, unset.UnsetType):
            self.count = count
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "count",
        ]
    
    @builtins.property
    def count(self) -> "builtins.int":
        return super()._get_field("count", explicit_presence=False,
        )
    @count.setter
    def count(self, value: "builtins.int|None") -> None:
        return super()._set_field("count",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "count":"count",
    }
    
__all__ = [
    #@ local import names here @#
    "Template",
    "TemplateStatus",
    "TemplateSpec",
    "ResourcesSpec",
    "PresetDetails",
    "Range",
    "Disk",
    "DiskSpec",
    "Host",
    "HostSpec",
]
