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

import nebius.base.protos.pb_classes as pb_classes
import nebius.api.nebius.msp.v1alpha1.resource.template_pb2 as template_pb2
import nebius.base.protos.descriptor as descriptor
import google.protobuf.descriptor as descriptor_1
import google.protobuf.message as message_1
import nebius.base.protos.unset as unset
import collections.abc as abc
import builtins as builtins
import nebius.api.nebius.msp.v1alpha1.resource.preset_pb2 as preset_pb2
import nebius.api.nebius.msp.v1alpha1.resource.preset_service_pb2 as preset_service_pb2
import nebius.aio.client as client
import grpc as grpc
import nebius.aio.request as request
import nebius.api.nebius.msp.v1alpha1.resource.template_service_pb2 as template_service_pb2
#@ 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",
    }
    
# file: nebius/msp/v1alpha1/resource/preset.proto
class Preset(pb_classes.Message):
    __PB2_CLASS__ = preset_pb2.Preset
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.Preset",preset_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        spec: "PresetSpec|preset_pb2.PresetSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(spec, unset.UnsetType):
            self.spec = spec
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "spec",
        ]
    
    @builtins.property
    def spec(self) -> "PresetSpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=PresetSpec,
        )
    @spec.setter
    def spec(self, value: "PresetSpec|preset_pb2.PresetSpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "spec":"spec",
    }
    
class PresetSpec(pb_classes.Message):
    __PB2_CLASS__ = preset_pb2.PresetSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.PresetSpec",preset_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        flavor: "FlavorSpec|preset_pb2.FlavorSpec|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(flavor, unset.UnsetType):
            self.flavor = flavor
        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 [
            "flavor",
            "hosts",
            "disk",
            "role",
        ]
    
    @builtins.property
    def flavor(self) -> "FlavorSpec":
        return super()._get_field("flavor", explicit_presence=False,
        wrap=FlavorSpec,
        )
    @flavor.setter
    def flavor(self, value: "FlavorSpec|preset_pb2.FlavorSpec|None") -> None:
        return super()._set_field("flavor",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] = {
        "flavor":"flavor",
        "hosts":"hosts",
        "disk":"disk",
        "role":"role",
    }
    
class FlavorSpec(pb_classes.Message):
    __PB2_CLASS__ = preset_pb2.FlavorSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.FlavorSpec",preset_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        cpu: "CpuSpec|preset_pb2.CpuSpec|None|unset.UnsetType" = unset.Unset,
        memory: "MemorySpec|preset_pb2.MemorySpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(cpu, unset.UnsetType):
            self.cpu = cpu
        if not isinstance(memory, unset.UnsetType):
            self.memory = memory
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "cpu",
            "memory",
        ]
    
    @builtins.property
    def cpu(self) -> "CpuSpec":
        return super()._get_field("cpu", explicit_presence=False,
        wrap=CpuSpec,
        )
    @cpu.setter
    def cpu(self, value: "CpuSpec|preset_pb2.CpuSpec|None") -> None:
        return super()._set_field("cpu",value,explicit_presence=False,
        )
    
    @builtins.property
    def memory(self) -> "MemorySpec":
        return super()._get_field("memory", explicit_presence=False,
        wrap=MemorySpec,
        )
    @memory.setter
    def memory(self, value: "MemorySpec|preset_pb2.MemorySpec|None") -> None:
        return super()._set_field("memory",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "cpu":"cpu",
        "memory":"memory",
    }
    
class CpuSpec(pb_classes.Message):
    __PB2_CLASS__ = preset_pb2.CpuSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.CpuSpec",preset_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,
        generation: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(count, unset.UnsetType):
            self.count = count
        if not isinstance(generation, unset.UnsetType):
            self.generation = generation
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "count",
            "generation",
        ]
    
    @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,
        )
    
    @builtins.property
    def generation(self) -> "builtins.int":
        return super()._get_field("generation", explicit_presence=False,
        )
    @generation.setter
    def generation(self, value: "builtins.int|None") -> None:
        return super()._set_field("generation",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "count":"count",
        "generation":"generation",
    }
    
class MemorySpec(pb_classes.Message):
    __PB2_CLASS__ = preset_pb2.MemorySpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.MemorySpec",preset_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        limit_gibibytes: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(limit_gibibytes, unset.UnsetType):
            self.limit_gibibytes = limit_gibibytes
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "limit_gibibytes",
        ]
    
    @builtins.property
    def limit_gibibytes(self) -> "builtins.int":
        return super()._get_field("limit_gibibytes", explicit_presence=False,
        )
    @limit_gibibytes.setter
    def limit_gibibytes(self, value: "builtins.int|None") -> None:
        return super()._set_field("limit_gibibytes",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "limit_gibibytes":"limit_gibibytes",
    }
    
# file: nebius/msp/v1alpha1/resource/preset_service.proto
class ListPresetsRequest(pb_classes.Message):
    __PB2_CLASS__ = preset_service_pb2.ListPresetsRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.ListPresetsRequest",preset_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        page_size: "builtins.int|None|unset.UnsetType" = unset.Unset,
        page_token: "builtins.str|None|unset.UnsetType" = unset.Unset,
        parent_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(page_size, unset.UnsetType):
            self.page_size = page_size
        if not isinstance(page_token, unset.UnsetType):
            self.page_token = page_token
        if not isinstance(parent_id, unset.UnsetType):
            self.parent_id = parent_id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "page_size",
            "page_token",
            "parent_id",
        ]
    
    @builtins.property
    def page_size(self) -> "builtins.int":
        return super()._get_field("page_size", explicit_presence=False,
        )
    @page_size.setter
    def page_size(self, value: "builtins.int|None") -> None:
        return super()._set_field("page_size",value,explicit_presence=False,
        )
    
    @builtins.property
    def page_token(self) -> "builtins.str":
        return super()._get_field("page_token", explicit_presence=False,
        )
    @page_token.setter
    def page_token(self, value: "builtins.str|None") -> None:
        return super()._set_field("page_token",value,explicit_presence=False,
        )
    
    @builtins.property
    def parent_id(self) -> "builtins.str":
        return super()._get_field("parent_id", explicit_presence=False,
        )
    @parent_id.setter
    def parent_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("parent_id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "page_size":"page_size",
        "page_token":"page_token",
        "parent_id":"parent_id",
    }
    
class ListPresetsResponse(pb_classes.Message):
    __PB2_CLASS__ = preset_service_pb2.ListPresetsResponse
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.ListPresetsResponse",preset_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        items: "abc.Iterable[Preset]|None|unset.UnsetType" = unset.Unset,
        next_page_token: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(items, unset.UnsetType):
            self.items = items
        if not isinstance(next_page_token, unset.UnsetType):
            self.next_page_token = next_page_token
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "items",
            "next_page_token",
        ]
    
    @builtins.property
    def items(self) -> "abc.MutableSequence[Preset]":
        return super()._get_field("items", explicit_presence=False,
        wrap=pb_classes.Repeated.with_wrap(Preset,None,None),
        )
    @items.setter
    def items(self, value: "abc.Iterable[Preset]|None") -> None:
        return super()._set_field("items",value,explicit_presence=False,
        )
    
    @builtins.property
    def next_page_token(self) -> "builtins.str":
        return super()._get_field("next_page_token", explicit_presence=False,
        )
    @next_page_token.setter
    def next_page_token(self, value: "builtins.str|None") -> None:
        return super()._set_field("next_page_token",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "items":"items",
        "next_page_token":"next_page_token",
    }
    

class PresetServiceClient(client.Client):
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.ServiceDescriptor](".nebius.msp.v1alpha1.resource.PresetService",preset_service_pb2.DESCRIPTOR,descriptor_1.ServiceDescriptor)
    __service_name__ = ".nebius.msp.v1alpha1.resource.PresetService"
    
    def list(self,
        request: "ListPresetsRequest",
        metadata: abc.Iterable[builtins.tuple[builtins.str,builtins.str]]|None = None,
        timeout: builtins.float|None = None,
        credentials: grpc.CallCredentials | None = None,
        compression: grpc.Compression | None = None,
        retries: builtins.int | None = 3,
        per_retry_timeout: builtins.float | None = None,
    ) -> request.Request["ListPresetsRequest","ListPresetsResponse"]:
        return super().request(
            method="List",
            request=request,
            result_pb2_class=preset_service_pb2.ListPresetsResponse,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=pb_classes.simple_wrapper(ListPresetsResponse),
        )
    

# file: nebius/msp/v1alpha1/resource/template_service.proto
class ListTemplatesRequest(pb_classes.Message):
    __PB2_CLASS__ = template_service_pb2.ListTemplatesRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.ListTemplatesRequest",template_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        page_size: "builtins.int|None|unset.UnsetType" = unset.Unset,
        page_token: "builtins.str|None|unset.UnsetType" = unset.Unset,
        parent_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(page_size, unset.UnsetType):
            self.page_size = page_size
        if not isinstance(page_token, unset.UnsetType):
            self.page_token = page_token
        if not isinstance(parent_id, unset.UnsetType):
            self.parent_id = parent_id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "page_size",
            "page_token",
            "parent_id",
        ]
    
    @builtins.property
    def page_size(self) -> "builtins.int":
        return super()._get_field("page_size", explicit_presence=False,
        )
    @page_size.setter
    def page_size(self, value: "builtins.int|None") -> None:
        return super()._set_field("page_size",value,explicit_presence=False,
        )
    
    @builtins.property
    def page_token(self) -> "builtins.str":
        return super()._get_field("page_token", explicit_presence=False,
        )
    @page_token.setter
    def page_token(self, value: "builtins.str|None") -> None:
        return super()._set_field("page_token",value,explicit_presence=False,
        )
    
    @builtins.property
    def parent_id(self) -> "builtins.str":
        return super()._get_field("parent_id", explicit_presence=False,
        )
    @parent_id.setter
    def parent_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("parent_id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "page_size":"page_size",
        "page_token":"page_token",
        "parent_id":"parent_id",
    }
    
class ListTemplatesResponse(pb_classes.Message):
    __PB2_CLASS__ = template_service_pb2.ListTemplatesResponse
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.v1alpha1.resource.ListTemplatesResponse",template_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        items: "abc.Iterable[Template]|None|unset.UnsetType" = unset.Unset,
        next_page_token: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(items, unset.UnsetType):
            self.items = items
        if not isinstance(next_page_token, unset.UnsetType):
            self.next_page_token = next_page_token
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "items",
            "next_page_token",
        ]
    
    @builtins.property
    def items(self) -> "abc.MutableSequence[Template]":
        return super()._get_field("items", explicit_presence=False,
        wrap=pb_classes.Repeated.with_wrap(Template,None,None),
        )
    @items.setter
    def items(self, value: "abc.Iterable[Template]|None") -> None:
        return super()._set_field("items",value,explicit_presence=False,
        )
    
    @builtins.property
    def next_page_token(self) -> "builtins.str":
        return super()._get_field("next_page_token", explicit_presence=False,
        )
    @next_page_token.setter
    def next_page_token(self, value: "builtins.str|None") -> None:
        return super()._set_field("next_page_token",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "items":"items",
        "next_page_token":"next_page_token",
    }
    

class TemplateServiceClient(client.Client):
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.ServiceDescriptor](".nebius.msp.v1alpha1.resource.TemplateService",template_service_pb2.DESCRIPTOR,descriptor_1.ServiceDescriptor)
    __service_name__ = ".nebius.msp.v1alpha1.resource.TemplateService"
    
    def list(self,
        request: "ListTemplatesRequest",
        metadata: abc.Iterable[builtins.tuple[builtins.str,builtins.str]]|None = None,
        timeout: builtins.float|None = None,
        credentials: grpc.CallCredentials | None = None,
        compression: grpc.Compression | None = None,
        retries: builtins.int | None = 3,
        per_retry_timeout: builtins.float | None = None,
    ) -> request.Request["ListTemplatesRequest","ListTemplatesResponse"]:
        return super().request(
            method="List",
            request=request,
            result_pb2_class=template_service_pb2.ListTemplatesResponse,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=pb_classes.simple_wrapper(ListTemplatesResponse),
        )
    

__all__ = [
    #@ local import names here @#
    "Template",
    "TemplateStatus",
    "TemplateSpec",
    "ResourcesSpec",
    "PresetDetails",
    "Range",
    "Disk",
    "DiskSpec",
    "Host",
    "HostSpec",
    "Preset",
    "PresetSpec",
    "FlavorSpec",
    "CpuSpec",
    "MemorySpec",
    "ListPresetsRequest",
    "ListPresetsResponse",
    "PresetServiceClient",
    "ListTemplatesRequest",
    "ListTemplatesResponse",
    "TemplateServiceClient",
]
