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

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

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.aio.client as client
import nebius.aio.operation as operation
import nebius.aio.request as request_1
import nebius.aio.request_kwargs as request_kwargs
import nebius.api.nebius.common.v1 as v1_1
import nebius.api.nebius.common.v1.metadata_pb2 as metadata_pb2
import nebius.api.nebius.common.v1.operation_pb2 as operation_pb2
import nebius.api.nebius.msp.serverless.v1alpha1.endpoint_pb2 as endpoint_pb2
import nebius.api.nebius.msp.serverless.v1alpha1.endpoint_service_pb2 as endpoint_service_pb2
import nebius.api.nebius.msp.serverless.v1alpha1.job_pb2 as job_pb2
import nebius.api.nebius.msp.serverless.v1alpha1.job_service_pb2 as job_service_pb2
import nebius.api.nebius.msp.v1alpha1 as v1alpha1_1
import nebius.api.nebius.msp.v1alpha1.cluster_pb2 as cluster_pb2
import nebius.api.nebius.msp.v1alpha1.resource as resource_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.pb_enum as pb_enum
import nebius.base.protos.unset as unset
import typing_extensions as typing_extensions
#@ local imports here @#

# file: nebius/msp/serverless/v1alpha1/endpoint.proto
class Endpoint(pb_classes.Message):
    __PB2_CLASS__ = endpoint_pb2.Endpoint
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.Endpoint",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        metadata: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None|unset.UnsetType" = unset.Unset,
        spec: "EndpointSpec|endpoint_pb2.EndpointSpec|None|unset.UnsetType" = unset.Unset,
        status: "EndpointStatus|endpoint_pb2.EndpointStatus|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(metadata, unset.UnsetType):
            self.metadata = metadata
        if not isinstance(spec, unset.UnsetType):
            self.spec = spec
        if not isinstance(status, unset.UnsetType):
            self.status = status
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "metadata",
            "spec",
            "status",
        ]
    
    @builtins.property
    def metadata(self) -> "v1_1.ResourceMetadata":
        return super()._get_field("metadata", explicit_presence=False,
        wrap=v1_1.ResourceMetadata,
        )
    @metadata.setter
    def metadata(self, value: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None") -> None:
        return super()._set_field("metadata",value,explicit_presence=False,
        )
    
    @builtins.property
    def spec(self) -> "EndpointSpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=EndpointSpec,
        )
    @spec.setter
    def spec(self, value: "EndpointSpec|endpoint_pb2.EndpointSpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    @builtins.property
    def status(self) -> "EndpointStatus":
        return super()._get_field("status", explicit_presence=False,
        wrap=EndpointStatus,
        )
    @status.setter
    def status(self, value: "EndpointStatus|endpoint_pb2.EndpointStatus|None") -> None:
        return super()._set_field("status",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "metadata":"metadata",
        "spec":"spec",
        "status":"status",
    }
    
class EndpointSpec(pb_classes.Message):
    __PB2_CLASS__ = endpoint_pb2.EndpointSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.EndpointSpec",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        description: "builtins.str|None|unset.UnsetType" = unset.Unset,
        network_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
        username: "builtins.str|None|unset.UnsetType" = unset.Unset,
        password: "builtins.str|None|unset.UnsetType" = unset.Unset,
        port: "builtins.int|None|unset.UnsetType" = unset.Unset,
        container: "EndpointContainerSpec|endpoint_pb2.EndpointContainerSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(description, unset.UnsetType):
            self.description = description
        if not isinstance(network_id, unset.UnsetType):
            self.network_id = network_id
        if not isinstance(username, unset.UnsetType):
            self.username = username
        if not isinstance(password, unset.UnsetType):
            self.password = password
        if not isinstance(port, unset.UnsetType):
            self.port = port
        if not isinstance(container, unset.UnsetType):
            self.container = container
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "description",
            "network_id",
            "username",
            "password",
            "port",
            "container",
        ]
    
    @builtins.property
    def description(self) -> "builtins.str":
        """
        Description of the endpoint.
        """
        
        return super()._get_field("description", explicit_presence=False,
        )
    @description.setter
    def description(self, value: "builtins.str|None") -> None:
        return super()._set_field("description",value,explicit_presence=False,
        )
    
    @builtins.property
    def network_id(self) -> "builtins.str":
        """
        Network ID to run the endpoint in
        """
        
        return super()._get_field("network_id", explicit_presence=False,
        )
    @network_id.setter
    def network_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("network_id",value,explicit_presence=False,
        )
    
    @builtins.property
    def username(self) -> "builtins.str":
        """
        Username for accessing the container endpoint.
        """
        
        return super()._get_field("username", explicit_presence=False,
        )
    @username.setter
    def username(self, value: "builtins.str|None") -> None:
        return super()._set_field("username",value,explicit_presence=False,
        )
    
    @builtins.property
    def password(self) -> "builtins.str":
        """
        Password for accessing the container endpoint.
        """
        
        return super()._get_field("password", explicit_presence=False,
        )
    @password.setter
    def password(self, value: "builtins.str|None") -> None:
        return super()._set_field("password",value,explicit_presence=False,
        )
    
    @builtins.property
    def port(self) -> "builtins.int":
        """
        Container port to be exposed.
        """
        
        return super()._get_field("port", explicit_presence=False,
        )
    @port.setter
    def port(self, value: "builtins.int|None") -> None:
        return super()._set_field("port",value,explicit_presence=False,
        )
    
    @builtins.property
    def container(self) -> "EndpointContainerSpec":
        """
        Container spec
        """
        
        return super()._get_field("container", explicit_presence=False,
        wrap=EndpointContainerSpec,
        )
    @container.setter
    def container(self, value: "EndpointContainerSpec|endpoint_pb2.EndpointContainerSpec|None") -> None:
        return super()._set_field("container",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "description":"description",
        "network_id":"network_id",
        "username":"username",
        "password":"password",
        "port":"port",
        "container":"container",
    }
    
class EndpointContainerSpec(pb_classes.Message):
    __PB2_CLASS__ = endpoint_pb2.EndpointContainerSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.EndpointContainerSpec",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    class EnvsEntry(pb_classes.Message):
        __PB2_CLASS__ = endpoint_pb2.EndpointContainerSpec.EnvsEntry
        __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.EndpointContainerSpec.EnvsEntry",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
        __mask_functions__ = {
        }
        
        def __init__(
            self,
            initial_message: message_1.Message|None = None,
            *,
            key: "builtins.str|None|unset.UnsetType" = unset.Unset,
            value: "builtins.str|None|unset.UnsetType" = unset.Unset,
        ) -> None:
            super().__init__(initial_message)
            if not isinstance(key, unset.UnsetType):
                self.key = key
            if not isinstance(value, unset.UnsetType):
                self.value = value
        
        def __dir__(self) ->abc.Iterable[builtins.str]:
            return [
                "key",
                "value",
            ]
        
        @builtins.property
        def key(self) -> "builtins.str":
            return super()._get_field("key", explicit_presence=False,
            )
        @key.setter
        def key(self, value: "builtins.str|None") -> None:
            return super()._set_field("key",value,explicit_presence=False,
            )
        
        @builtins.property
        def value(self) -> "builtins.str":
            return super()._get_field("value", explicit_presence=False,
            )
        @value.setter
        def value(self, value: "builtins.str|None") -> None:
            return super()._set_field("value",value,explicit_presence=False,
            )
        
        __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
            "key":"key",
            "value":"value",
        }
        
    
    class SensitiveEnvsEntry(pb_classes.Message):
        __PB2_CLASS__ = endpoint_pb2.EndpointContainerSpec.SensitiveEnvsEntry
        __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.EndpointContainerSpec.SensitiveEnvsEntry",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
        __mask_functions__ = {
        }
        
        def __init__(
            self,
            initial_message: message_1.Message|None = None,
            *,
            key: "builtins.str|None|unset.UnsetType" = unset.Unset,
            value: "builtins.str|None|unset.UnsetType" = unset.Unset,
        ) -> None:
            super().__init__(initial_message)
            if not isinstance(key, unset.UnsetType):
                self.key = key
            if not isinstance(value, unset.UnsetType):
                self.value = value
        
        def __dir__(self) ->abc.Iterable[builtins.str]:
            return [
                "key",
                "value",
            ]
        
        @builtins.property
        def key(self) -> "builtins.str":
            return super()._get_field("key", explicit_presence=False,
            )
        @key.setter
        def key(self, value: "builtins.str|None") -> None:
            return super()._set_field("key",value,explicit_presence=False,
            )
        
        @builtins.property
        def value(self) -> "builtins.str":
            return super()._get_field("value", explicit_presence=False,
            )
        @value.setter
        def value(self, value: "builtins.str|None") -> None:
            return super()._set_field("value",value,explicit_presence=False,
            )
        
        __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
            "key":"key",
            "value":"value",
        }
        
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        image: "builtins.str|None|unset.UnsetType" = unset.Unset,
        replica_count: "builtins.int|None|unset.UnsetType" = unset.Unset,
        template: "EndpointTemplateSpec|endpoint_pb2.EndpointTemplateSpec|None|unset.UnsetType" = unset.Unset,
        command: "builtins.str|None|unset.UnsetType" = unset.Unset,
        args: "abc.Iterable[builtins.str]|None|unset.UnsetType" = unset.Unset,
        envs: "abc.Mapping[builtins.str,builtins.str]|None|unset.UnsetType" = unset.Unset,
        sensitive_envs: "abc.Mapping[builtins.str,builtins.str]|None|unset.UnsetType" = unset.Unset,
        liveness: "ProbeSpec|endpoint_pb2.ProbeSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(image, unset.UnsetType):
            self.image = image
        if not isinstance(replica_count, unset.UnsetType):
            self.replica_count = replica_count
        if not isinstance(template, unset.UnsetType):
            self.template = template
        if not isinstance(command, unset.UnsetType):
            self.command = command
        if not isinstance(args, unset.UnsetType):
            self.args = args
        if not isinstance(envs, unset.UnsetType):
            self.envs = envs
        if not isinstance(sensitive_envs, unset.UnsetType):
            self.sensitive_envs = sensitive_envs
        if not isinstance(liveness, unset.UnsetType):
            self.liveness = liveness
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "image",
            "replica_count",
            "template",
            "command",
            "args",
            "envs",
            "sensitive_envs",
            "liveness",
            "EnvsEntry",
            "SensitiveEnvsEntry",
        ]
    
    @builtins.property
    def image(self) -> "builtins.str":
        """
        Image name
        """
        
        return super()._get_field("image", explicit_presence=False,
        )
    @image.setter
    def image(self, value: "builtins.str|None") -> None:
        return super()._set_field("image",value,explicit_presence=False,
        )
    
    @builtins.property
    def replica_count(self) -> "builtins.int":
        """
        Replica count
        """
        
        return super()._get_field("replica_count", explicit_presence=False,
        )
    @replica_count.setter
    def replica_count(self, value: "builtins.int|None") -> None:
        return super()._set_field("replica_count",value,explicit_presence=False,
        )
    
    @builtins.property
    def template(self) -> "EndpointTemplateSpec":
        """
        Container resource template
        """
        
        return super()._get_field("template", explicit_presence=False,
        wrap=EndpointTemplateSpec,
        )
    @template.setter
    def template(self, value: "EndpointTemplateSpec|endpoint_pb2.EndpointTemplateSpec|None") -> None:
        return super()._set_field("template",value,explicit_presence=False,
        )
    
    @builtins.property
    def command(self) -> "builtins.str":
        """
        Endpoint command
        """
        
        return super()._get_field("command", explicit_presence=False,
        )
    @command.setter
    def command(self, value: "builtins.str|None") -> None:
        return super()._set_field("command",value,explicit_presence=False,
        )
    
    @builtins.property
    def args(self) -> "abc.MutableSequence[builtins.str]":
        """
        Command args
        """
        
        return super()._get_field("args", explicit_presence=False,
        wrap=pb_classes.Repeated,
        )
    @args.setter
    def args(self, value: "abc.Iterable[builtins.str]|None") -> None:
        return super()._set_field("args",value,explicit_presence=False,
        )
    
    @builtins.property
    def envs(self) -> "abc.MutableMapping[builtins.str,builtins.str]":
        """
        Environment variables
        """
        
        return super()._get_field("envs", explicit_presence=False,
        wrap=pb_classes.Map,
        )
    @envs.setter
    def envs(self, value: "abc.Mapping[builtins.str,builtins.str]|None") -> None:
        return super()._set_field("envs",value,explicit_presence=False,
        )
    
    @builtins.property
    def sensitive_envs(self) -> "abc.MutableMapping[builtins.str,builtins.str]":
        """
        Environment variables with sensitive data
        """
        
        return super()._get_field("sensitive_envs", explicit_presence=False,
        wrap=pb_classes.Map,
        )
    @sensitive_envs.setter
    def sensitive_envs(self, value: "abc.Mapping[builtins.str,builtins.str]|None") -> None:
        return super()._set_field("sensitive_envs",value,explicit_presence=False,
        )
    
    @builtins.property
    def liveness(self) -> "ProbeSpec":
        """
        Liveness probe spec
        """
        
        return super()._get_field("liveness", explicit_presence=False,
        wrap=ProbeSpec,
        )
    @liveness.setter
    def liveness(self, value: "ProbeSpec|endpoint_pb2.ProbeSpec|None") -> None:
        return super()._set_field("liveness",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "image":"image",
        "replica_count":"replica_count",
        "template":"template",
        "command":"command",
        "args":"args",
        "envs":"envs",
        "sensitive_envs":"sensitive_envs",
        "liveness":"liveness",
        "EnvsEntry":"EnvsEntry",
        "SensitiveEnvsEntry":"SensitiveEnvsEntry",
    }
    
class ProbeSpec(pb_classes.Message):
    __PB2_CLASS__ = endpoint_pb2.ProbeSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.ProbeSpec",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        path: "builtins.str|None|unset.UnsetType" = unset.Unset,
        delay_seconds: "builtins.int|None|unset.UnsetType" = unset.Unset,
        period_seconds: "builtins.int|None|unset.UnsetType" = unset.Unset,
        failure_threshold: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(path, unset.UnsetType):
            self.path = path
        if not isinstance(delay_seconds, unset.UnsetType):
            self.delay_seconds = delay_seconds
        if not isinstance(period_seconds, unset.UnsetType):
            self.period_seconds = period_seconds
        if not isinstance(failure_threshold, unset.UnsetType):
            self.failure_threshold = failure_threshold
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "path",
            "delay_seconds",
            "period_seconds",
            "failure_threshold",
        ]
    
    @builtins.property
    def path(self) -> "builtins.str":
        """
        Probe path
        """
        
        return super()._get_field("path", explicit_presence=False,
        )
    @path.setter
    def path(self, value: "builtins.str|None") -> None:
        return super()._set_field("path",value,explicit_presence=False,
        )
    
    @builtins.property
    def delay_seconds(self) -> "builtins.int":
        """
        Initial delay before starting probing in seconds
        """
        
        return super()._get_field("delay_seconds", explicit_presence=False,
        )
    @delay_seconds.setter
    def delay_seconds(self, value: "builtins.int|None") -> None:
        return super()._set_field("delay_seconds",value,explicit_presence=False,
        )
    
    @builtins.property
    def period_seconds(self) -> "builtins.int":
        """
        Probing period in seconds
        """
        
        return super()._get_field("period_seconds", explicit_presence=False,
        )
    @period_seconds.setter
    def period_seconds(self, value: "builtins.int|None") -> None:
        return super()._set_field("period_seconds",value,explicit_presence=False,
        )
    
    @builtins.property
    def failure_threshold(self) -> "builtins.int":
        """
        Failure threshold for the probe after which the container will be restarted
        """
        
        return super()._get_field("failure_threshold", explicit_presence=False,
        )
    @failure_threshold.setter
    def failure_threshold(self, value: "builtins.int|None") -> None:
        return super()._set_field("failure_threshold",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "path":"path",
        "delay_seconds":"delay_seconds",
        "period_seconds":"period_seconds",
        "failure_threshold":"failure_threshold",
    }
    
class EndpointTemplateSpec(pb_classes.Message):
    __PB2_CLASS__ = endpoint_pb2.EndpointTemplateSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.EndpointTemplateSpec",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        resources: "resource_1.ResourcesSpec|template_pb2.ResourcesSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(resources, unset.UnsetType):
            self.resources = resources
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "resources",
        ]
    
    @builtins.property
    def resources(self) -> "resource_1.ResourcesSpec":
        return super()._get_field("resources", explicit_presence=False,
        wrap=resource_1.ResourcesSpec,
        )
    @resources.setter
    def resources(self, value: "resource_1.ResourcesSpec|template_pb2.ResourcesSpec|None") -> None:
        return super()._set_field("resources",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "resources":"resources",
    }
    
class EndpointStatus(pb_classes.Message):
    __PB2_CLASS__ = endpoint_pb2.EndpointStatus
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.EndpointStatus",endpoint_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        phase: "v1alpha1_1.ClusterStatus.Phase|cluster_pb2.ClusterStatus.Phase|None|unset.UnsetType" = unset.Unset,
        state: "v1alpha1_1.ClusterStatus.State|cluster_pb2.ClusterStatus.State|None|unset.UnsetType" = unset.Unset,
        public_endpoint: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(phase, unset.UnsetType):
            self.phase = phase
        if not isinstance(state, unset.UnsetType):
            self.state = state
        if not isinstance(public_endpoint, unset.UnsetType):
            self.public_endpoint = public_endpoint
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "phase",
            "state",
            "public_endpoint",
        ]
    
    @builtins.property
    def phase(self) -> "v1alpha1_1.ClusterStatus.Phase":
        """
        Current phase (or stage) of the workload.
        """
        
        return super()._get_field("phase", explicit_presence=False,
        wrap=v1alpha1_1.ClusterStatus.Phase,
        )
    @phase.setter
    def phase(self, value: "v1alpha1_1.ClusterStatus.Phase|cluster_pb2.ClusterStatus.Phase|None") -> None:
        return super()._set_field("phase",value,explicit_presence=False,
        )
    
    @builtins.property
    def state(self) -> "v1alpha1_1.ClusterStatus.State":
        """
        State reflects substatus of the phase
        """
        
        return super()._get_field("state", explicit_presence=False,
        wrap=v1alpha1_1.ClusterStatus.State,
        )
    @state.setter
    def state(self, value: "v1alpha1_1.ClusterStatus.State|cluster_pb2.ClusterStatus.State|None") -> None:
        return super()._set_field("state",value,explicit_presence=False,
        )
    
    @builtins.property
    def public_endpoint(self) -> "builtins.str":
        """
        Public endpoint for accessing the workload.
        """
        
        return super()._get_field("public_endpoint", explicit_presence=False,
        )
    @public_endpoint.setter
    def public_endpoint(self, value: "builtins.str|None") -> None:
        return super()._set_field("public_endpoint",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "phase":"phase",
        "state":"state",
        "public_endpoint":"public_endpoint",
    }
    
# file: nebius/msp/serverless/v1alpha1/endpoint_service.proto
class CreateEndpointRequest(pb_classes.Message):
    __PB2_CLASS__ = endpoint_service_pb2.CreateEndpointRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.CreateEndpointRequest",endpoint_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        metadata: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None|unset.UnsetType" = unset.Unset,
        spec: "EndpointSpec|endpoint_pb2.EndpointSpec|None|unset.UnsetType" = unset.Unset,
        dry_run: "builtins.bool|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(metadata, unset.UnsetType):
            self.metadata = metadata
        if not isinstance(spec, unset.UnsetType):
            self.spec = spec
        if not isinstance(dry_run, unset.UnsetType):
            self.dry_run = dry_run
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "metadata",
            "spec",
            "dry_run",
        ]
    
    @builtins.property
    def metadata(self) -> "v1_1.ResourceMetadata":
        return super()._get_field("metadata", explicit_presence=False,
        wrap=v1_1.ResourceMetadata,
        )
    @metadata.setter
    def metadata(self, value: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None") -> None:
        return super()._set_field("metadata",value,explicit_presence=False,
        )
    
    @builtins.property
    def spec(self) -> "EndpointSpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=EndpointSpec,
        )
    @spec.setter
    def spec(self, value: "EndpointSpec|endpoint_pb2.EndpointSpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    @builtins.property
    def dry_run(self) -> "builtins.bool":
        """
        If set to true, only API validation will be performed, without creating the endpoint.
        Returned operation will be in "done" state. ID of resource will be empty.
        """
        
        return super()._get_field("dry_run", explicit_presence=False,
        )
    @dry_run.setter
    def dry_run(self, value: "builtins.bool|None") -> None:
        return super()._set_field("dry_run",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "metadata":"metadata",
        "spec":"spec",
        "dry_run":"dry_run",
    }
    
class ListEndpointsResponse(pb_classes.Message):
    __PB2_CLASS__ = endpoint_service_pb2.ListEndpointsResponse
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.ListEndpointsResponse",endpoint_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        items: "abc.Iterable[Endpoint]|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[Endpoint]":
        """
        List of Endpoints.
        """
        
        return super()._get_field("items", explicit_presence=False,
        wrap=pb_classes.Repeated.with_wrap(Endpoint,None,None),
        )
    @items.setter
    def items(self, value: "abc.Iterable[Endpoint]|None") -> None:
        return super()._set_field("items",value,explicit_presence=False,
        )
    
    @builtins.property
    def next_page_token(self) -> "builtins.str":
        """
        Token for pagination, indicating the next set of results can be retrieved using this token.
        """
        
        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 EndpointServiceClient(client.ClientWithOperations[v1_1.Operation,v1_1.OperationServiceClient]):
    """
    This class provides the client methods for the ``.nebius.msp.serverless.v1alpha1.EndpointService`` service.
    
    Each method constructs a :class:`nebius.aio.request.Request` object
    that represents the in-flight RPC. The request can be awaited (async)
    or waited synchronously using its ``.wait()`` helpers.
    
    The request methods accept various parameters to configure metadata,
    timeouts, authorization, and retries. See individual method docstrings
    for details.
    
    :cvar __service_name__: The full protobuf service name.
    """
    
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.ServiceDescriptor](".nebius.msp.serverless.v1alpha1.EndpointService",endpoint_service_pb2.DESCRIPTOR,descriptor_1.ServiceDescriptor)
    """The protobuf service descriptor extraction function."""
    __service_name__ = ".nebius.msp.serverless.v1alpha1.EndpointService"
    __operation_type__ = v1_1.Operation
    __operation_service_class__ = v1_1.OperationServiceClient
    __operation_source_method__ = "Create"
    """The method name that can be used to fetch the address channel for the operation."""
    
    def get(self,
        request: "v1alpha1_1.GetRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.GetRequest","Endpoint"]:
        """
        Returns the specified endpoint.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.GetRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.msp.serverless.v1alpha1.Endpoint`.
        """
        
        return super().request(
            method="Get",
            request=request,
            result_pb2_class=endpoint_pb2.Endpoint,
            result_wrapper=pb_classes.simple_wrapper(Endpoint),
            **kwargs,
        )
    
    def get_by_name(self,
        request: "v1alpha1_1.GetByNameRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.GetByNameRequest","Endpoint"]:
        """
        Returns the specified endpoint by name.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.GetByNameRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.msp.serverless.v1alpha1.Endpoint`.
        """
        
        return super().request(
            method="GetByName",
            request=request,
            result_pb2_class=endpoint_pb2.Endpoint,
            result_wrapper=pb_classes.simple_wrapper(Endpoint),
            **kwargs,
        )
    
    def list(self,
        request: "v1alpha1_1.ListRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.ListRequest","ListEndpointsResponse"]:
        """
        Retrieves a list of Endpoints.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.ListRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.msp.serverless.v1alpha1.ListEndpointsResponse`.
        """
        
        return super().request(
            method="List",
            request=request,
            result_pb2_class=endpoint_service_pb2.ListEndpointsResponse,
            result_wrapper=pb_classes.simple_wrapper(ListEndpointsResponse),
            **kwargs,
        )
    
    def create(self,
        request: "CreateEndpointRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["CreateEndpointRequest","operation.Operation[v1_1.Operation]"]:
        """
        Creates an endpoint.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.serverless.v1alpha1.CreateEndpointRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Create",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    
    def delete(self,
        request: "v1alpha1_1.DeleteRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.DeleteRequest","operation.Operation[v1_1.Operation]"]:
        """
        Delete an endpoint.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.DeleteRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Delete",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    
    def start(self,
        request: "v1alpha1_1.StartRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.StartRequest","operation.Operation[v1_1.Operation]"]:
        """
        Start an endpoint.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.StartRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Start",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    
    def stop(self,
        request: "v1alpha1_1.StopRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.StopRequest","operation.Operation[v1_1.Operation]"]:
        """
        Stop an endpoint.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.StopRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Stop",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    

# file: nebius/msp/serverless/v1alpha1/job.proto
class JobResult(pb_enum.Enum):
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.EnumDescriptor](".nebius.msp.serverless.v1alpha1.JobResult",job_pb2.DESCRIPTOR,descriptor_1.EnumDescriptor)
    JOB_RESULT_UNSPECIFIED = 0
    """
    Job is not finished yet.
    """
    
    JOB_RESULT_SUCCESS = 1
    """
    Job finished successfully.
    """
    
    JOB_RESULT_FAILURE = 2
    """
    Job failed.
    """
    
    JOB_RESULT_CANCELLED = 3
    """
    Job was cancelled.
    """
    

class Job(pb_classes.Message):
    __PB2_CLASS__ = job_pb2.Job
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.Job",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        metadata: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None|unset.UnsetType" = unset.Unset,
        spec: "JobSpec|job_pb2.JobSpec|None|unset.UnsetType" = unset.Unset,
        status: "JobStatus|job_pb2.JobStatus|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(metadata, unset.UnsetType):
            self.metadata = metadata
        if not isinstance(spec, unset.UnsetType):
            self.spec = spec
        if not isinstance(status, unset.UnsetType):
            self.status = status
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "metadata",
            "spec",
            "status",
        ]
    
    @builtins.property
    def metadata(self) -> "v1_1.ResourceMetadata":
        return super()._get_field("metadata", explicit_presence=False,
        wrap=v1_1.ResourceMetadata,
        )
    @metadata.setter
    def metadata(self, value: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None") -> None:
        return super()._set_field("metadata",value,explicit_presence=False,
        )
    
    @builtins.property
    def spec(self) -> "JobSpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=JobSpec,
        )
    @spec.setter
    def spec(self, value: "JobSpec|job_pb2.JobSpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    @builtins.property
    def status(self) -> "JobStatus":
        return super()._get_field("status", explicit_presence=False,
        wrap=JobStatus,
        )
    @status.setter
    def status(self, value: "JobStatus|job_pb2.JobStatus|None") -> None:
        return super()._set_field("status",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "metadata":"metadata",
        "spec":"spec",
        "status":"status",
    }
    
class JobSpec(pb_classes.Message):
    __PB2_CLASS__ = job_pb2.JobSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.JobSpec",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        description: "builtins.str|None|unset.UnsetType" = unset.Unset,
        network_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
        container: "JobContainerSpec|job_pb2.JobContainerSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(description, unset.UnsetType):
            self.description = description
        if not isinstance(network_id, unset.UnsetType):
            self.network_id = network_id
        if not isinstance(container, unset.UnsetType):
            self.container = container
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "description",
            "network_id",
            "container",
        ]
    
    @builtins.property
    def description(self) -> "builtins.str":
        """
        Description of the job.
        """
        
        return super()._get_field("description", explicit_presence=False,
        )
    @description.setter
    def description(self, value: "builtins.str|None") -> None:
        return super()._set_field("description",value,explicit_presence=False,
        )
    
    @builtins.property
    def network_id(self) -> "builtins.str":
        """
        Network ID to run the job in
        """
        
        return super()._get_field("network_id", explicit_presence=False,
        )
    @network_id.setter
    def network_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("network_id",value,explicit_presence=False,
        )
    
    @builtins.property
    def container(self) -> "JobContainerSpec":
        """
        Container spec
        """
        
        return super()._get_field("container", explicit_presence=False,
        wrap=JobContainerSpec,
        )
    @container.setter
    def container(self, value: "JobContainerSpec|job_pb2.JobContainerSpec|None") -> None:
        return super()._set_field("container",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "description":"description",
        "network_id":"network_id",
        "container":"container",
    }
    
class JobContainerSpec(pb_classes.Message):
    __PB2_CLASS__ = job_pb2.JobContainerSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.JobContainerSpec",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    class EnvsEntry(pb_classes.Message):
        __PB2_CLASS__ = job_pb2.JobContainerSpec.EnvsEntry
        __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.JobContainerSpec.EnvsEntry",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
        __mask_functions__ = {
        }
        
        def __init__(
            self,
            initial_message: message_1.Message|None = None,
            *,
            key: "builtins.str|None|unset.UnsetType" = unset.Unset,
            value: "builtins.str|None|unset.UnsetType" = unset.Unset,
        ) -> None:
            super().__init__(initial_message)
            if not isinstance(key, unset.UnsetType):
                self.key = key
            if not isinstance(value, unset.UnsetType):
                self.value = value
        
        def __dir__(self) ->abc.Iterable[builtins.str]:
            return [
                "key",
                "value",
            ]
        
        @builtins.property
        def key(self) -> "builtins.str":
            return super()._get_field("key", explicit_presence=False,
            )
        @key.setter
        def key(self, value: "builtins.str|None") -> None:
            return super()._set_field("key",value,explicit_presence=False,
            )
        
        @builtins.property
        def value(self) -> "builtins.str":
            return super()._get_field("value", explicit_presence=False,
            )
        @value.setter
        def value(self, value: "builtins.str|None") -> None:
            return super()._set_field("value",value,explicit_presence=False,
            )
        
        __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
            "key":"key",
            "value":"value",
        }
        
    
    class SensitiveEnvsEntry(pb_classes.Message):
        __PB2_CLASS__ = job_pb2.JobContainerSpec.SensitiveEnvsEntry
        __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.JobContainerSpec.SensitiveEnvsEntry",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
        __mask_functions__ = {
        }
        
        def __init__(
            self,
            initial_message: message_1.Message|None = None,
            *,
            key: "builtins.str|None|unset.UnsetType" = unset.Unset,
            value: "builtins.str|None|unset.UnsetType" = unset.Unset,
        ) -> None:
            super().__init__(initial_message)
            if not isinstance(key, unset.UnsetType):
                self.key = key
            if not isinstance(value, unset.UnsetType):
                self.value = value
        
        def __dir__(self) ->abc.Iterable[builtins.str]:
            return [
                "key",
                "value",
            ]
        
        @builtins.property
        def key(self) -> "builtins.str":
            return super()._get_field("key", explicit_presence=False,
            )
        @key.setter
        def key(self, value: "builtins.str|None") -> None:
            return super()._set_field("key",value,explicit_presence=False,
            )
        
        @builtins.property
        def value(self) -> "builtins.str":
            return super()._get_field("value", explicit_presence=False,
            )
        @value.setter
        def value(self, value: "builtins.str|None") -> None:
            return super()._set_field("value",value,explicit_presence=False,
            )
        
        __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
            "key":"key",
            "value":"value",
        }
        
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        image: "builtins.str|None|unset.UnsetType" = unset.Unset,
        replica_count: "builtins.int|None|unset.UnsetType" = unset.Unset,
        template: "JobTemplateSpec|job_pb2.JobTemplateSpec|None|unset.UnsetType" = unset.Unset,
        command: "builtins.str|None|unset.UnsetType" = unset.Unset,
        args: "abc.Iterable[builtins.str]|None|unset.UnsetType" = unset.Unset,
        envs: "abc.Mapping[builtins.str,builtins.str]|None|unset.UnsetType" = unset.Unset,
        sensitive_envs: "abc.Mapping[builtins.str,builtins.str]|None|unset.UnsetType" = unset.Unset,
        timeout_seconds: "builtins.int|None|unset.UnsetType" = unset.Unset,
        max_retries: "builtins.int|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(image, unset.UnsetType):
            self.image = image
        if not isinstance(replica_count, unset.UnsetType):
            self.replica_count = replica_count
        if not isinstance(template, unset.UnsetType):
            self.template = template
        if not isinstance(command, unset.UnsetType):
            self.command = command
        if not isinstance(args, unset.UnsetType):
            self.args = args
        if not isinstance(envs, unset.UnsetType):
            self.envs = envs
        if not isinstance(sensitive_envs, unset.UnsetType):
            self.sensitive_envs = sensitive_envs
        if not isinstance(timeout_seconds, unset.UnsetType):
            self.timeout_seconds = timeout_seconds
        if not isinstance(max_retries, unset.UnsetType):
            self.max_retries = max_retries
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "image",
            "replica_count",
            "template",
            "command",
            "args",
            "envs",
            "sensitive_envs",
            "timeout_seconds",
            "max_retries",
            "EnvsEntry",
            "SensitiveEnvsEntry",
        ]
    
    @builtins.property
    def image(self) -> "builtins.str":
        """
        Image name
        """
        
        return super()._get_field("image", explicit_presence=False,
        )
    @image.setter
    def image(self, value: "builtins.str|None") -> None:
        return super()._set_field("image",value,explicit_presence=False,
        )
    
    @builtins.property
    def replica_count(self) -> "builtins.int":
        """
        Replica count
        """
        
        return super()._get_field("replica_count", explicit_presence=False,
        )
    @replica_count.setter
    def replica_count(self, value: "builtins.int|None") -> None:
        return super()._set_field("replica_count",value,explicit_presence=False,
        )
    
    @builtins.property
    def template(self) -> "JobTemplateSpec":
        """
        Container resource template
        """
        
        return super()._get_field("template", explicit_presence=False,
        wrap=JobTemplateSpec,
        )
    @template.setter
    def template(self, value: "JobTemplateSpec|job_pb2.JobTemplateSpec|None") -> None:
        return super()._set_field("template",value,explicit_presence=False,
        )
    
    @builtins.property
    def command(self) -> "builtins.str":
        """
        Job command
        """
        
        return super()._get_field("command", explicit_presence=False,
        )
    @command.setter
    def command(self, value: "builtins.str|None") -> None:
        return super()._set_field("command",value,explicit_presence=False,
        )
    
    @builtins.property
    def args(self) -> "abc.MutableSequence[builtins.str]":
        """
        Command args
        """
        
        return super()._get_field("args", explicit_presence=False,
        wrap=pb_classes.Repeated,
        )
    @args.setter
    def args(self, value: "abc.Iterable[builtins.str]|None") -> None:
        return super()._set_field("args",value,explicit_presence=False,
        )
    
    @builtins.property
    def envs(self) -> "abc.MutableMapping[builtins.str,builtins.str]":
        """
        Environment variables
        """
        
        return super()._get_field("envs", explicit_presence=False,
        wrap=pb_classes.Map,
        )
    @envs.setter
    def envs(self, value: "abc.Mapping[builtins.str,builtins.str]|None") -> None:
        return super()._set_field("envs",value,explicit_presence=False,
        )
    
    @builtins.property
    def sensitive_envs(self) -> "abc.MutableMapping[builtins.str,builtins.str]":
        """
        Environment variables with sensitive data
        """
        
        return super()._get_field("sensitive_envs", explicit_presence=False,
        wrap=pb_classes.Map,
        )
    @sensitive_envs.setter
    def sensitive_envs(self, value: "abc.Mapping[builtins.str,builtins.str]|None") -> None:
        return super()._set_field("sensitive_envs",value,explicit_presence=False,
        )
    
    @builtins.property
    def timeout_seconds(self) -> "builtins.int":
        """
        Job timeout in seconds (0 - no timeout)
        """
        
        return super()._get_field("timeout_seconds", explicit_presence=False,
        )
    @timeout_seconds.setter
    def timeout_seconds(self, value: "builtins.int|None") -> None:
        return super()._set_field("timeout_seconds",value,explicit_presence=False,
        )
    
    @builtins.property
    def max_retries(self) -> "builtins.int":
        """
        Max retries (0 - no retries)
        """
        
        return super()._get_field("max_retries", explicit_presence=False,
        )
    @max_retries.setter
    def max_retries(self, value: "builtins.int|None") -> None:
        return super()._set_field("max_retries",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "image":"image",
        "replica_count":"replica_count",
        "template":"template",
        "command":"command",
        "args":"args",
        "envs":"envs",
        "sensitive_envs":"sensitive_envs",
        "timeout_seconds":"timeout_seconds",
        "max_retries":"max_retries",
        "EnvsEntry":"EnvsEntry",
        "SensitiveEnvsEntry":"SensitiveEnvsEntry",
    }
    
class JobTemplateSpec(pb_classes.Message):
    __PB2_CLASS__ = job_pb2.JobTemplateSpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.JobTemplateSpec",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        resources: "resource_1.ResourcesSpec|template_pb2.ResourcesSpec|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(resources, unset.UnsetType):
            self.resources = resources
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "resources",
        ]
    
    @builtins.property
    def resources(self) -> "resource_1.ResourcesSpec":
        return super()._get_field("resources", explicit_presence=False,
        wrap=resource_1.ResourcesSpec,
        )
    @resources.setter
    def resources(self, value: "resource_1.ResourcesSpec|template_pb2.ResourcesSpec|None") -> None:
        return super()._set_field("resources",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "resources":"resources",
    }
    
class JobStatus(pb_classes.Message):
    __PB2_CLASS__ = job_pb2.JobStatus
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.JobStatus",job_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        phase: "v1alpha1_1.ClusterStatus.Phase|cluster_pb2.ClusterStatus.Phase|None|unset.UnsetType" = unset.Unset,
        state: "v1alpha1_1.ClusterStatus.State|cluster_pb2.ClusterStatus.State|None|unset.UnsetType" = unset.Unset,
        result: "JobResult|job_pb2.JobResult|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(phase, unset.UnsetType):
            self.phase = phase
        if not isinstance(state, unset.UnsetType):
            self.state = state
        if not isinstance(result, unset.UnsetType):
            self.result = result
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "phase",
            "state",
            "result",
        ]
    
    @builtins.property
    def phase(self) -> "v1alpha1_1.ClusterStatus.Phase":
        """
        Current phase (or stage) of the workload.
        """
        
        return super()._get_field("phase", explicit_presence=False,
        wrap=v1alpha1_1.ClusterStatus.Phase,
        )
    @phase.setter
    def phase(self, value: "v1alpha1_1.ClusterStatus.Phase|cluster_pb2.ClusterStatus.Phase|None") -> None:
        return super()._set_field("phase",value,explicit_presence=False,
        )
    
    @builtins.property
    def state(self) -> "v1alpha1_1.ClusterStatus.State":
        """
        State reflects substatus of the phase
        """
        
        return super()._get_field("state", explicit_presence=False,
        wrap=v1alpha1_1.ClusterStatus.State,
        )
    @state.setter
    def state(self, value: "v1alpha1_1.ClusterStatus.State|cluster_pb2.ClusterStatus.State|None") -> None:
        return super()._set_field("state",value,explicit_presence=False,
        )
    
    @builtins.property
    def result(self) -> "JobResult":
        """
        Job result
        """
        
        return super()._get_field("result", explicit_presence=False,
        wrap=JobResult,
        )
    @result.setter
    def result(self, value: "JobResult|job_pb2.JobResult|None") -> None:
        return super()._set_field("result",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "phase":"phase",
        "state":"state",
        "result":"result",
    }
    
# file: nebius/msp/serverless/v1alpha1/job_service.proto
class CreateJobRequest(pb_classes.Message):
    __PB2_CLASS__ = job_service_pb2.CreateJobRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.CreateJobRequest",job_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        metadata: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None|unset.UnsetType" = unset.Unset,
        spec: "JobSpec|job_pb2.JobSpec|None|unset.UnsetType" = unset.Unset,
        dry_run: "builtins.bool|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(metadata, unset.UnsetType):
            self.metadata = metadata
        if not isinstance(spec, unset.UnsetType):
            self.spec = spec
        if not isinstance(dry_run, unset.UnsetType):
            self.dry_run = dry_run
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "metadata",
            "spec",
            "dry_run",
        ]
    
    @builtins.property
    def metadata(self) -> "v1_1.ResourceMetadata":
        return super()._get_field("metadata", explicit_presence=False,
        wrap=v1_1.ResourceMetadata,
        )
    @metadata.setter
    def metadata(self, value: "v1_1.ResourceMetadata|metadata_pb2.ResourceMetadata|None") -> None:
        return super()._set_field("metadata",value,explicit_presence=False,
        )
    
    @builtins.property
    def spec(self) -> "JobSpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=JobSpec,
        )
    @spec.setter
    def spec(self, value: "JobSpec|job_pb2.JobSpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    @builtins.property
    def dry_run(self) -> "builtins.bool":
        """
        If set to true, only API validation will be performed, without creating the job.
        Returned operation will be in "done" state. ID of resource will be empty.
        """
        
        return super()._get_field("dry_run", explicit_presence=False,
        )
    @dry_run.setter
    def dry_run(self, value: "builtins.bool|None") -> None:
        return super()._set_field("dry_run",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "metadata":"metadata",
        "spec":"spec",
        "dry_run":"dry_run",
    }
    
class CancelJobRequest(pb_classes.Message):
    __PB2_CLASS__ = job_service_pb2.CancelJobRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.CancelJobRequest",job_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(id, unset.UnsetType):
            self.id = id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "id",
        ]
    
    @builtins.property
    def id(self) -> "builtins.str":
        """
        ID of the job to cancel.
        """
        
        return super()._get_field("id", explicit_presence=False,
        )
    @id.setter
    def id(self, value: "builtins.str|None") -> None:
        return super()._set_field("id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "id":"id",
    }
    
class ListJobsResponse(pb_classes.Message):
    __PB2_CLASS__ = job_service_pb2.ListJobsResponse
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.msp.serverless.v1alpha1.ListJobsResponse",job_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        items: "abc.Iterable[Job]|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[Job]":
        """
        List of jobs.
        """
        
        return super()._get_field("items", explicit_presence=False,
        wrap=pb_classes.Repeated.with_wrap(Job,None,None),
        )
    @items.setter
    def items(self, value: "abc.Iterable[Job]|None") -> None:
        return super()._set_field("items",value,explicit_presence=False,
        )
    
    @builtins.property
    def next_page_token(self) -> "builtins.str":
        """
        Token for pagination, indicating the next set of results can be retrieved using this token.
        """
        
        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 JobServiceClient(client.ClientWithOperations[v1_1.Operation,v1_1.OperationServiceClient]):
    """
    This class provides the client methods for the ``.nebius.msp.serverless.v1alpha1.JobService`` service.
    
    Each method constructs a :class:`nebius.aio.request.Request` object
    that represents the in-flight RPC. The request can be awaited (async)
    or waited synchronously using its ``.wait()`` helpers.
    
    The request methods accept various parameters to configure metadata,
    timeouts, authorization, and retries. See individual method docstrings
    for details.
    
    :cvar __service_name__: The full protobuf service name.
    """
    
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.ServiceDescriptor](".nebius.msp.serverless.v1alpha1.JobService",job_service_pb2.DESCRIPTOR,descriptor_1.ServiceDescriptor)
    """The protobuf service descriptor extraction function."""
    __service_name__ = ".nebius.msp.serverless.v1alpha1.JobService"
    __operation_type__ = v1_1.Operation
    __operation_service_class__ = v1_1.OperationServiceClient
    __operation_source_method__ = "Create"
    """The method name that can be used to fetch the address channel for the operation."""
    
    def get(self,
        request: "v1alpha1_1.GetRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.GetRequest","Job"]:
        """
        Returns the specified job.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.GetRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.msp.serverless.v1alpha1.Job`.
        """
        
        return super().request(
            method="Get",
            request=request,
            result_pb2_class=job_pb2.Job,
            result_wrapper=pb_classes.simple_wrapper(Job),
            **kwargs,
        )
    
    def list(self,
        request: "v1alpha1_1.ListRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.ListRequest","ListJobsResponse"]:
        """
        Retrieves a list of jobs.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.ListRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.msp.serverless.v1alpha1.ListJobsResponse`.
        """
        
        return super().request(
            method="List",
            request=request,
            result_pb2_class=job_service_pb2.ListJobsResponse,
            result_wrapper=pb_classes.simple_wrapper(ListJobsResponse),
            **kwargs,
        )
    
    def create(self,
        request: "CreateJobRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["CreateJobRequest","operation.Operation[v1_1.Operation]"]:
        """
        Creates a job.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.serverless.v1alpha1.CreateJobRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Create",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    
    def delete(self,
        request: "v1alpha1_1.DeleteRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["v1alpha1_1.DeleteRequest","operation.Operation[v1_1.Operation]"]:
        """
        Delete a job.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.v1alpha1.DeleteRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Delete",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    
    def cancel(self,
        request: "CancelJobRequest",
        **kwargs: typing_extensions.Unpack[request_kwargs.RequestKwargs]
    ) -> request_1.Request["CancelJobRequest","operation.Operation[v1_1.Operation]"]:
        """
        Cancel a job.
        
        :param request: The request object to send.
        :type request: :class:`nebius.api.nebius.msp.serverless.v1alpha1.CancelJobRequest`
        
        Other parameters can be provided as keyword arguments in the
        ``**kwargs`` dictionary, including metadata, timeouts, and retries.
        See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
        
        :return: A :class:`nebius.aio.request.Request` object representing the
            in-flight RPC. It can be awaited (async) or waited
            synchronously using its ``.wait()`` helpers.
        :rtype: :class:`nebius.aio.request.Request` of
            :class:`nebius.api.nebius.common.v1.Operation`.
        """
        
        return super().request(
            method="Cancel",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            result_wrapper=operation.Operation,
            **kwargs,
        )
    

__all__ = [
    #@ local import names here @#
    "Endpoint",
    "EndpointSpec",
    "EndpointContainerSpec",
    "ProbeSpec",
    "EndpointTemplateSpec",
    "EndpointStatus",
    "CreateEndpointRequest",
    "ListEndpointsResponse",
    "EndpointServiceClient",
    "JobResult",
    "Job",
    "JobSpec",
    "JobContainerSpec",
    "JobTemplateSpec",
    "JobStatus",
    "CreateJobRequest",
    "CancelJobRequest",
    "ListJobsResponse",
    "JobServiceClient",
]
