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

import nebius.base.protos.pb_classes as pb_classes
import nebius.api.nebius.iam.v2.access_key_pb2 as access_key_pb2
import nebius.base.protos.descriptor as descriptor
import google.protobuf.descriptor as descriptor_1
import google.protobuf.message as message_1
import nebius.api.nebius.common.v1 as v1_1
import nebius.api.nebius.common.v1.metadata_pb2 as metadata_pb2
import nebius.base.protos.unset as unset
import collections.abc as abc
import builtins as builtins
import nebius.base.protos.well_known as well_known_1
import nebius.api.nebius.iam.v1 as v1_2
import nebius.api.nebius.iam.v1.access_pb2 as access_pb2
import google.protobuf.timestamp_pb2 as timestamp_pb2
import datetime as datetime
import nebius.base.protos.pb_enum as pb_enum
import nebius.api.nebius.iam.v2.access_key_service_pb2 as access_key_service_pb2
import typing as typing
import nebius.aio.client as client
import grpc as grpc
import nebius.aio.request as request_1
import nebius.aio.operation as operation
import nebius.api.nebius.common.v1.operation_pb2 as operation_pb2
import nebius.base.fieldmask_protobuf as fieldmask_protobuf
#@ local imports here @#

# file: nebius/iam/v2/access_key.proto
class AccessKey(pb_classes.Message):
    __PB2_CLASS__ = access_key_pb2.AccessKey
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.AccessKey",access_key_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: "AccessKeySpec|access_key_pb2.AccessKeySpec|None|unset.UnsetType" = unset.Unset,
        status: "AccessKeyStatus|access_key_pb2.AccessKeyStatus|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) -> "AccessKeySpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=AccessKeySpec,
        )
    @spec.setter
    def spec(self, value: "AccessKeySpec|access_key_pb2.AccessKeySpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    @builtins.property
    def status(self) -> "AccessKeyStatus":
        return super()._get_field("status", explicit_presence=False,
        wrap=AccessKeyStatus,
        )
    @status.setter
    def status(self, value: "AccessKeyStatus|access_key_pb2.AccessKeyStatus|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 AccessKeySpec(pb_classes.Message):
    __PB2_CLASS__ = access_key_pb2.AccessKeySpec
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.AccessKeySpec",access_key_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
        "expires_at": well_known_1.ts_mask,
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        account: "v1_2.Account|access_pb2.Account|None|unset.UnsetType" = unset.Unset,
        expires_at: "timestamp_pb2.Timestamp|datetime.datetime|None|unset.UnsetType" = unset.Unset,
        description: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(account, unset.UnsetType):
            self.account = account
        if not isinstance(expires_at, unset.UnsetType):
            self.expires_at = expires_at
        if not isinstance(description, unset.UnsetType):
            self.description = description
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "account",
            "expires_at",
            "description",
        ]
    
    @builtins.property
    def account(self) -> "v1_2.Account":
        return super()._get_field("account", explicit_presence=False,
        wrap=v1_2.Account,
        )
    @account.setter
    def account(self, value: "v1_2.Account|access_pb2.Account|None") -> None:
        return super()._set_field("account",value,explicit_presence=False,
        )
    
    @builtins.property
    def expires_at(self) -> "datetime.datetime":
        return super()._get_field("expires_at", explicit_presence=False,
        wrap=well_known_1.from_timestamp
        )
    @expires_at.setter
    def expires_at(self, value: "timestamp_pb2.Timestamp|datetime.datetime|None") -> None:
        return super()._set_field("expires_at",value,explicit_presence=False,
        unwrap=well_known_1.to_timestamp
        )
    
    @builtins.property
    def description(self) -> "builtins.str":
        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,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "account":"account",
        "expires_at":"expires_at",
        "description":"description",
    }
    
class AccessKeyStatus(pb_classes.Message):
    __PB2_CLASS__ = access_key_pb2.AccessKeyStatus
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.AccessKeyStatus",access_key_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    class State(pb_enum.Enum):
        __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.EnumDescriptor](".nebius.iam.v2.AccessKeyStatus.State",access_key_pb2.DESCRIPTOR,descriptor_1.EnumDescriptor)
        STATE_UNSPECIFIED = 0
        ACTIVE = 1
        INACTIVE = 2
        EXPIRED = 3
        DELETING = 4
        DELETED = 5
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        state: "AccessKeyStatus.State|access_key_pb2.AccessKeyStatus.State|None|unset.UnsetType" = unset.Unset,
        fingerprint: "builtins.str|None|unset.UnsetType" = unset.Unset,
        algorithm: "builtins.str|None|unset.UnsetType" = unset.Unset,
        key_size: "builtins.int|None|unset.UnsetType" = unset.Unset,
        aws_access_key_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
        secret: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(state, unset.UnsetType):
            self.state = state
        if not isinstance(fingerprint, unset.UnsetType):
            self.fingerprint = fingerprint
        if not isinstance(algorithm, unset.UnsetType):
            self.algorithm = algorithm
        if not isinstance(key_size, unset.UnsetType):
            self.key_size = key_size
        if not isinstance(aws_access_key_id, unset.UnsetType):
            self.aws_access_key_id = aws_access_key_id
        if not isinstance(secret, unset.UnsetType):
            self.secret = secret
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "state",
            "fingerprint",
            "algorithm",
            "key_size",
            "aws_access_key_id",
            "secret",
            "State",
        ]
    
    @builtins.property
    def state(self) -> "AccessKeyStatus.State":
        return super()._get_field("state", explicit_presence=False,
        wrap=AccessKeyStatus.State,
        )
    @state.setter
    def state(self, value: "AccessKeyStatus.State|access_key_pb2.AccessKeyStatus.State|None") -> None:
        return super()._set_field("state",value,explicit_presence=False,
        )
    
    @builtins.property
    def fingerprint(self) -> "builtins.str":
        return super()._get_field("fingerprint", explicit_presence=False,
        )
    @fingerprint.setter
    def fingerprint(self, value: "builtins.str|None") -> None:
        return super()._set_field("fingerprint",value,explicit_presence=False,
        )
    
    @builtins.property
    def algorithm(self) -> "builtins.str":
        return super()._get_field("algorithm", explicit_presence=False,
        )
    @algorithm.setter
    def algorithm(self, value: "builtins.str|None") -> None:
        return super()._set_field("algorithm",value,explicit_presence=False,
        )
    
    @builtins.property
    def key_size(self) -> "builtins.int":
        return super()._get_field("key_size", explicit_presence=False,
        )
    @key_size.setter
    def key_size(self, value: "builtins.int|None") -> None:
        return super()._set_field("key_size",value,explicit_presence=False,
        )
    
    @builtins.property
    def aws_access_key_id(self) -> "builtins.str":
        return super()._get_field("aws_access_key_id", explicit_presence=False,
        )
    @aws_access_key_id.setter
    def aws_access_key_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("aws_access_key_id",value,explicit_presence=False,
        )
    
    @builtins.property
    def secret(self) -> "builtins.str":
        return super()._get_field("secret", explicit_presence=False,
        )
    @secret.setter
    def secret(self, value: "builtins.str|None") -> None:
        return super()._set_field("secret",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "state":"state",
        "fingerprint":"fingerprint",
        "algorithm":"algorithm",
        "key_size":"key_size",
        "aws_access_key_id":"aws_access_key_id",
        "secret":"secret",
        "State":"State",
    }
    
# file: nebius/iam/v2/access_key_service.proto
class CreateAccessKeyRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.CreateAccessKeyRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.CreateAccessKeyRequest",access_key_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: "AccessKeySpec|access_key_pb2.AccessKeySpec|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
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "metadata",
            "spec",
        ]
    
    @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) -> "AccessKeySpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=AccessKeySpec,
        )
    @spec.setter
    def spec(self, value: "AccessKeySpec|access_key_pb2.AccessKeySpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "metadata":"metadata",
        "spec":"spec",
    }
    
class GetAccessKeyRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.GetAccessKeyRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.GetAccessKeyRequest",access_key_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":
        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 GetAccessKeyByAwsIdRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.GetAccessKeyByAwsIdRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.GetAccessKeyByAwsIdRequest",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        aws_access_key_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(aws_access_key_id, unset.UnsetType):
            self.aws_access_key_id = aws_access_key_id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "aws_access_key_id",
        ]
    
    @builtins.property
    def aws_access_key_id(self) -> "builtins.str":
        return super()._get_field("aws_access_key_id", explicit_presence=False,
        )
    @aws_access_key_id.setter
    def aws_access_key_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("aws_access_key_id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "aws_access_key_id":"aws_access_key_id",
    }
    
class ListAccessKeysRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.ListAccessKeysRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.ListAccessKeysRequest",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    class __OneOfClass__page_size__(pb_classes.OneOf):
        name: builtins.str= "_page_size"
        
        def __init__(self, msg: "ListAccessKeysRequest") -> None:
            super().__init__()
            self._message: "ListAccessKeysRequest" = msg
    
    class __OneOfClass__page_size_page_size__(__OneOfClass__page_size__):
        field: typing.Literal["page_size"] = "page_size"
        
        def __init__(self, msg: "ListAccessKeysRequest") -> None:
            super().__init__(msg)
        @builtins.property
        def value(self) -> "builtins.int":
            return self._message.page_size
    
    @builtins.property
    def _page_size(self) -> __OneOfClass__page_size_page_size__|None:
        field_name_1: str|None = super().which_field_in_oneof("_page_size")
        match field_name_1:
            case "page_size":
                return self.__OneOfClass__page_size_page_size__(self)
            case None:
                return None
            case _:
                raise pb_classes.OneOfMatchError(field_name_1)
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        parent_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
        page_size: "builtins.int|None|unset.UnsetType" = unset.Unset,
        page_token: "builtins.str|None|unset.UnsetType" = unset.Unset,
        filter: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(parent_id, unset.UnsetType):
            self.parent_id = parent_id
        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(filter, unset.UnsetType):
            self.filter = filter
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "parent_id",
            "page_size",
            "page_token",
            "filter",
            "_page_size",
        ]
    
    @builtins.property
    def parent_id(self) -> "builtins.str":
        """
         Represents the container ID.
        """
        
        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,
        )
    
    @builtins.property
    def page_size(self) -> "builtins.int|None":
        """
         Specifies the maximum number of items to return in the response.
         Default value: 10
        """
        
        return super()._get_field("page_size", explicit_presence=True,
        )
    @page_size.setter
    def page_size(self, value: "builtins.int|None") -> None:
        return super()._set_field("page_size",value,explicit_presence=True,
        )
    
    @builtins.property
    def page_token(self) -> "builtins.str":
        """
         Token for pagination, allowing the retrieval of the next set of results.
        """
        
        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 filter(self) -> "builtins.str":
        """
         A filter to narrow down the results based on specific criteria.
        """
        
        return super()._get_field("filter", explicit_presence=False,
        )
    @filter.setter
    def filter(self, value: "builtins.str|None") -> None:
        return super()._set_field("filter",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "parent_id":"parent_id",
        "page_size":"page_size",
        "page_token":"page_token",
        "filter":"filter",
        "_page_size":"_page_size",
    }
    
class ListAccessKeysByAccountRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.ListAccessKeysByAccountRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.ListAccessKeysByAccountRequest",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        account: "v1_2.Account|access_pb2.Account|None|unset.UnsetType" = unset.Unset,
        page_size: "builtins.int|None|unset.UnsetType" = unset.Unset,
        page_token: "builtins.str|None|unset.UnsetType" = unset.Unset,
        filter: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(account, unset.UnsetType):
            self.account = account
        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(filter, unset.UnsetType):
            self.filter = filter
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "account",
            "page_size",
            "page_token",
            "filter",
        ]
    
    @builtins.property
    def account(self) -> "v1_2.Account":
        """
         Represents the parent account ID.
        """
        
        return super()._get_field("account", explicit_presence=False,
        wrap=v1_2.Account,
        )
    @account.setter
    def account(self, value: "v1_2.Account|access_pb2.Account|None") -> None:
        return super()._set_field("account",value,explicit_presence=False,
        )
    
    @builtins.property
    def page_size(self) -> "builtins.int":
        """
         Specifies the maximum number of items to return in the response.
         Default value: 10
        """
        
        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":
        """
         Token for pagination, allowing the retrieval of the next set of results.
        """
        
        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 filter(self) -> "builtins.str":
        """
         A filter to narrow down the results based on specific criteria.
        """
        
        return super()._get_field("filter", explicit_presence=False,
        )
    @filter.setter
    def filter(self, value: "builtins.str|None") -> None:
        return super()._set_field("filter",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "account":"account",
        "page_size":"page_size",
        "page_token":"page_token",
        "filter":"filter",
    }
    
class UpdateAccessKeyRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.UpdateAccessKeyRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.UpdateAccessKeyRequest",access_key_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: "AccessKeySpec|access_key_pb2.AccessKeySpec|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
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "metadata",
            "spec",
        ]
    
    @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) -> "AccessKeySpec":
        return super()._get_field("spec", explicit_presence=False,
        wrap=AccessKeySpec,
        )
    @spec.setter
    def spec(self, value: "AccessKeySpec|access_key_pb2.AccessKeySpec|None") -> None:
        return super()._set_field("spec",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "metadata":"metadata",
        "spec":"spec",
    }
    
class ActivateAccessKeyRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.ActivateAccessKeyRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.ActivateAccessKeyRequest",access_key_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":
        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 DeactivateAccessKeyRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.DeactivateAccessKeyRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.DeactivateAccessKeyRequest",access_key_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":
        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 ActivateAccessKeyByAwsIdRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.ActivateAccessKeyByAwsIdRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.ActivateAccessKeyByAwsIdRequest",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        aws_access_key_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(aws_access_key_id, unset.UnsetType):
            self.aws_access_key_id = aws_access_key_id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "aws_access_key_id",
        ]
    
    @builtins.property
    def aws_access_key_id(self) -> "builtins.str":
        return super()._get_field("aws_access_key_id", explicit_presence=False,
        )
    @aws_access_key_id.setter
    def aws_access_key_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("aws_access_key_id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "aws_access_key_id":"aws_access_key_id",
    }
    
class DeactivateAccessKeyByAwsIdRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.DeactivateAccessKeyByAwsIdRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.DeactivateAccessKeyByAwsIdRequest",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        aws_access_key_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(aws_access_key_id, unset.UnsetType):
            self.aws_access_key_id = aws_access_key_id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "aws_access_key_id",
        ]
    
    @builtins.property
    def aws_access_key_id(self) -> "builtins.str":
        return super()._get_field("aws_access_key_id", explicit_presence=False,
        )
    @aws_access_key_id.setter
    def aws_access_key_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("aws_access_key_id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "aws_access_key_id":"aws_access_key_id",
    }
    
class DeleteAccessKeyRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.DeleteAccessKeyRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.DeleteAccessKeyRequest",access_key_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":
        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 DeleteAccessKeyByAwsIdRequest(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.DeleteAccessKeyByAwsIdRequest
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.DeleteAccessKeyByAwsIdRequest",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        aws_access_key_id: "builtins.str|None|unset.UnsetType" = unset.Unset,
    ) -> None:
        super().__init__(initial_message)
        if not isinstance(aws_access_key_id, unset.UnsetType):
            self.aws_access_key_id = aws_access_key_id
    
    def __dir__(self) ->abc.Iterable[builtins.str]:
        return [
            "aws_access_key_id",
        ]
    
    @builtins.property
    def aws_access_key_id(self) -> "builtins.str":
        return super()._get_field("aws_access_key_id", explicit_presence=False,
        )
    @aws_access_key_id.setter
    def aws_access_key_id(self, value: "builtins.str|None") -> None:
        return super()._set_field("aws_access_key_id",value,explicit_presence=False,
        )
    
    __PY_TO_PB2__: builtins.dict[builtins.str,builtins.str] = {
        "aws_access_key_id":"aws_access_key_id",
    }
    
class ListAccessKeysResponse(pb_classes.Message):
    __PB2_CLASS__ = access_key_service_pb2.ListAccessKeysResponse
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.Descriptor](".nebius.iam.v2.ListAccessKeysResponse",access_key_service_pb2.DESCRIPTOR,descriptor_1.Descriptor)
    __mask_functions__ = {
    }
    
    def __init__(
        self,
        initial_message: message_1.Message|None = None,
        *,
        items: "abc.Iterable[AccessKey]|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[AccessKey]":
        """
         List of access keys returned in the response. The field should be named as `items` for consistency.
        """
        
        return super()._get_field("items", explicit_presence=False,
        wrap=pb_classes.Repeated.with_wrap(AccessKey,None,None),
        )
    @items.setter
    def items(self, value: "abc.Iterable[AccessKey]|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 AccessKeyServiceClient(client.ClientWithOperations[v1_1.Operation,v1_1.OperationServiceClient]):
    __PB2_DESCRIPTOR__ = descriptor.DescriptorWrap[descriptor_1.ServiceDescriptor](".nebius.iam.v2.AccessKeyService",access_key_service_pb2.DESCRIPTOR,descriptor_1.ServiceDescriptor)
    __service_name__ = ".nebius.iam.v2.AccessKeyService"
    __operation_type__ = v1_1.Operation
    __operation_service_class__ = v1_1.OperationServiceClient
    __operation_source_method__ = "Create"
    
    def create(self,
        request: "CreateAccessKeyRequest",
        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_1.Request["CreateAccessKeyRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="Create",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def get(self,
        request: "GetAccessKeyRequest",
        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_1.Request["GetAccessKeyRequest","AccessKey"]:
        return super().request(
            method="Get",
            request=request,
            result_pb2_class=access_key_pb2.AccessKey,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=pb_classes.simple_wrapper(AccessKey),
        )
    
    def list(self,
        request: "ListAccessKeysRequest",
        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_1.Request["ListAccessKeysRequest","ListAccessKeysResponse"]:
        return super().request(
            method="List",
            request=request,
            result_pb2_class=access_key_service_pb2.ListAccessKeysResponse,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=pb_classes.simple_wrapper(ListAccessKeysResponse),
        )
    
    def update(self,
        request: "UpdateAccessKeyRequest",
        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_1.Request["UpdateAccessKeyRequest","operation.Operation[v1_1.Operation]"]:
        metadata = fieldmask_protobuf.ensure_reset_mask_in_metadata(request, metadata)
        return super().request(
            method="Update",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def delete(self,
        request: "DeleteAccessKeyRequest",
        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_1.Request["DeleteAccessKeyRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="Delete",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def activate(self,
        request: "ActivateAccessKeyRequest",
        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_1.Request["ActivateAccessKeyRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="Activate",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def deactivate(self,
        request: "DeactivateAccessKeyRequest",
        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_1.Request["DeactivateAccessKeyRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="Deactivate",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def list_by_account(self,
        request: "ListAccessKeysByAccountRequest",
        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_1.Request["ListAccessKeysByAccountRequest","ListAccessKeysResponse"]:
        return super().request(
            method="ListByAccount",
            request=request,
            result_pb2_class=access_key_service_pb2.ListAccessKeysResponse,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=pb_classes.simple_wrapper(ListAccessKeysResponse),
        )
    
    def get_by_aws_id(self,
        request: "GetAccessKeyByAwsIdRequest",
        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_1.Request["GetAccessKeyByAwsIdRequest","AccessKey"]:
        return super().request(
            method="GetByAwsId",
            request=request,
            result_pb2_class=access_key_pb2.AccessKey,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=pb_classes.simple_wrapper(AccessKey),
        )
    
    def delete_by_aws_id(self,
        request: "DeleteAccessKeyByAwsIdRequest",
        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_1.Request["DeleteAccessKeyByAwsIdRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="DeleteByAwsId",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def activate_by_aws_id(self,
        request: "ActivateAccessKeyByAwsIdRequest",
        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_1.Request["ActivateAccessKeyByAwsIdRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="ActivateByAwsId",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    
    def deactivate_by_aws_id(self,
        request: "DeactivateAccessKeyByAwsIdRequest",
        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_1.Request["DeactivateAccessKeyByAwsIdRequest","operation.Operation[v1_1.Operation]"]:
        return super().request(
            method="DeactivateByAwsId",
            request=request,
            result_pb2_class=operation_pb2.Operation,
            metadata=metadata,
            timeout=timeout,
            credentials=credentials,
            compression=compression,
            retries=retries,
            per_retry_timeout=per_retry_timeout,
            result_wrapper=operation.Operation,
        )
    

__all__ = [
    #@ local import names here @#
    "AccessKey",
    "AccessKeySpec",
    "AccessKeyStatus",
    "CreateAccessKeyRequest",
    "GetAccessKeyRequest",
    "GetAccessKeyByAwsIdRequest",
    "ListAccessKeysRequest",
    "ListAccessKeysByAccountRequest",
    "UpdateAccessKeyRequest",
    "ActivateAccessKeyRequest",
    "DeactivateAccessKeyRequest",
    "ActivateAccessKeyByAwsIdRequest",
    "DeactivateAccessKeyByAwsIdRequest",
    "DeleteAccessKeyRequest",
    "DeleteAccessKeyByAwsIdRequest",
    "ListAccessKeysResponse",
    "AccessKeyServiceClient",
]
