"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _RepositoryType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _RepositoryTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_RepositoryType.ValueType], builtins.type):  # noqa: F821
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    REPOSITORY_TYPE_UNSPECIFIED: _RepositoryType.ValueType  # 0
    LOCAL: _RepositoryType.ValueType  # 1
    REMOTE: _RepositoryType.ValueType  # 2

class RepositoryType(_RepositoryType, metaclass=_RepositoryTypeEnumTypeWrapper): ...

REPOSITORY_TYPE_UNSPECIFIED: RepositoryType.ValueType  # 0
LOCAL: RepositoryType.ValueType  # 1
REMOTE: RepositoryType.ValueType  # 2
global___RepositoryType = RepositoryType

class _JFrogPermissionType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _JFrogPermissionTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_JFrogPermissionType.ValueType], builtins.type):  # noqa: F821
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    JFROG_PERMISSION_TYPE_UNSPECIFIED: _JFrogPermissionType.ValueType  # 0
    """Unspecified permission type"""
    READ: _JFrogPermissionType.ValueType  # 1
    """Action: `r` - Read Permssions"""
    WRITE: _JFrogPermissionType.ValueType  # 2
    """Action: `w` - Write/ Deploy/Cache Permssions. Needed to e.g. push images, or cache images in remote repos."""
    DELETE: _JFrogPermissionType.ValueType  # 3
    """Action: `d` - Delete permission"""
    ANNOTATE: _JFrogPermissionType.ValueType  # 4
    """Action: `a`"""
    EXECUTE: _JFrogPermissionType.ValueType  # 5
    """Action: `x`"""
    SCAN: _JFrogPermissionType.ValueType  # 6
    """Action: `s`"""
    MANAGE: _JFrogPermissionType.ValueType  # 7
    """Action: `m` - Manage permission"""

class JFrogPermissionType(_JFrogPermissionType, metaclass=_JFrogPermissionTypeEnumTypeWrapper):
    """JFrog permission types.
    Options are taken from https://jfrog.com/help/r/jfrog-rest-apis/create-scoped-token
    """

JFROG_PERMISSION_TYPE_UNSPECIFIED: JFrogPermissionType.ValueType  # 0
"""Unspecified permission type"""
READ: JFrogPermissionType.ValueType  # 1
"""Action: `r` - Read Permssions"""
WRITE: JFrogPermissionType.ValueType  # 2
"""Action: `w` - Write/ Deploy/Cache Permssions. Needed to e.g. push images, or cache images in remote repos."""
DELETE: JFrogPermissionType.ValueType  # 3
"""Action: `d` - Delete permission"""
ANNOTATE: JFrogPermissionType.ValueType  # 4
"""Action: `a`"""
EXECUTE: JFrogPermissionType.ValueType  # 5
"""Action: `x`"""
SCAN: JFrogPermissionType.ValueType  # 6
"""Action: `s`"""
MANAGE: JFrogPermissionType.ValueType  # 7
"""Action: `m` - Manage permission"""
global___JFrogPermissionType = JFrogPermissionType

class JFrogToken(google.protobuf.message.Message):
    """//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    definition
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    DEFINITION_FIELD_NUMBER: builtins.int
    TENANT_DETAILS_FIELD_NUMBER: builtins.int
    @property
    def definition(self) -> global___JFrogTokenDefinition:
        """Token definition"""
    @property
    def tenant_details(self) -> global___JFrogTokenTenantDetails:
        """JFrog Tenant details"""
    def __init__(
        self,
        *,
        definition: global___JFrogTokenDefinition | None = ...,
        tenant_details: global___JFrogTokenTenantDetails | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["definition", b"definition", "tenant_details", b"tenant_details"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["definition", b"definition", "tenant_details", b"tenant_details"]) -> None: ...

global___JFrogToken = JFrogToken

class JFrogTokenTenantDetails(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PLATFORM_URL_FIELD_NUMBER: builtins.int
    platform_url: builtins.str
    """Tenant platform url"""
    def __init__(
        self,
        *,
        platform_url: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["platform_url", b"platform_url"]) -> None: ...

global___JFrogTokenTenantDetails = JFrogTokenTenantDetails

class JFrogTokenDefinition(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TOKEN_FIELD_NUMBER: builtins.int
    REFRESH_TOKEN_FIELD_NUMBER: builtins.int
    EXPIRATION_TIME_FIELD_NUMBER: builtins.int
    SUBJECT_FIELD_NUMBER: builtins.int
    SUBJECT_NAME_FIELD_NUMBER: builtins.int
    TOKEN_ID_FIELD_NUMBER: builtins.int
    token: builtins.str
    """The generated token"""
    refresh_token: builtins.str
    @property
    def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    subject: builtins.str
    """Token subject"""
    subject_name: builtins.str
    """Token subject name
    For users: username, otherwise subject
    (use this as the username for docker login)
    """
    token_id: builtins.str
    """Token Id"""
    def __init__(
        self,
        *,
        token: builtins.str = ...,
        refresh_token: builtins.str = ...,
        expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        subject: builtins.str = ...,
        subject_name: builtins.str = ...,
        token_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["expiration_time", b"expiration_time", "optional_expiration_time", b"optional_expiration_time", "optional_refresh_token", b"optional_refresh_token", "refresh_token", b"refresh_token"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["expiration_time", b"expiration_time", "optional_expiration_time", b"optional_expiration_time", "optional_refresh_token", b"optional_refresh_token", "refresh_token", b"refresh_token", "subject", b"subject", "subject_name", b"subject_name", "token", b"token", "token_id", b"token_id"]) -> None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing_extensions.Literal["optional_expiration_time", b"optional_expiration_time"]) -> typing_extensions.Literal["expiration_time"] | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing_extensions.Literal["optional_refresh_token", b"optional_refresh_token"]) -> typing_extensions.Literal["refresh_token"] | None: ...

global___JFrogTokenDefinition = JFrogTokenDefinition

class JFrogTokenSpec(google.protobuf.message.Message):
    """//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    spec
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    JFROG_TENANT_ID_FIELD_NUMBER: builtins.int
    SUBJECT_AND_SCOPE_SOURCE_FIELD_NUMBER: builtins.int
    AUDIENCES_FIELD_NUMBER: builtins.int
    TTL_SPEC_FIELD_NUMBER: builtins.int
    jfrog_tenant_id: builtins.str
    """JFrog tenant id"""
    @property
    def subject_and_scope_source(self) -> global___SubjectAndScopeSource:
        """Subject and scope source"""
    @property
    def audiences(self) -> global___JFrogTokenAudiences:
        """Audiences
        Optional, if empty- *@* will be used
        """
    @property
    def ttl_spec(self) -> global___JFrogTokenTTLSpec:
        """Ttl spec"""
    def __init__(
        self,
        *,
        jfrog_tenant_id: builtins.str = ...,
        subject_and_scope_source: global___SubjectAndScopeSource | None = ...,
        audiences: global___JFrogTokenAudiences | None = ...,
        ttl_spec: global___JFrogTokenTTLSpec | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["audiences", b"audiences", "subject_and_scope_source", b"subject_and_scope_source", "ttl_spec", b"ttl_spec"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["audiences", b"audiences", "jfrog_tenant_id", b"jfrog_tenant_id", "subject_and_scope_source", b"subject_and_scope_source", "ttl_spec", b"ttl_spec"]) -> None: ...

global___JFrogTokenSpec = JFrogTokenSpec

class ArtifactoryImagePullTokenSpec(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    JFROG_TENANT_ID_FIELD_NUMBER: builtins.int
    REPOSITORY_KEY_FIELD_NUMBER: builtins.int
    TTL_SPEC_FIELD_NUMBER: builtins.int
    REPOSITORY_KEYS_FIELD_NUMBER: builtins.int
    REPOSITORY_TOKEN_SPECS_FIELD_NUMBER: builtins.int
    jfrog_tenant_id: builtins.str
    """JFrog tenant id"""
    repository_key: builtins.str
    """Artifactory repository key
    Deprecated: use `repository_keys` instead.
    """
    @property
    def ttl_spec(self) -> global___JFrogTokenTTLSpec:
        """Ttl spec"""
    @property
    def repository_keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Deprecated: use `repository_token_specs` instead."""
    @property
    def repository_token_specs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RepositoryTokenSpec]:
        """Repository token specifications"""
    def __init__(
        self,
        *,
        jfrog_tenant_id: builtins.str = ...,
        repository_key: builtins.str = ...,
        ttl_spec: global___JFrogTokenTTLSpec | None = ...,
        repository_keys: collections.abc.Iterable[builtins.str] | None = ...,
        repository_token_specs: collections.abc.Iterable[global___RepositoryTokenSpec] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["ttl_spec", b"ttl_spec"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["jfrog_tenant_id", b"jfrog_tenant_id", "repository_key", b"repository_key", "repository_keys", b"repository_keys", "repository_token_specs", b"repository_token_specs", "ttl_spec", b"ttl_spec"]) -> None: ...

global___ArtifactoryImagePullTokenSpec = ArtifactoryImagePullTokenSpec

class PersistTokenClaimsSpec(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    JFROG_TENANT_ID_FIELD_NUMBER: builtins.int
    TOKEN_FIELD_NUMBER: builtins.int
    TOKEN_SCOPE_EXTENSION_FIELD_NUMBER: builtins.int
    jfrog_tenant_id: builtins.str
    """JFrog tenant id"""
    token: builtins.str
    """Token to persist"""
    @property
    def token_scope_extension(self) -> global___TokenScopeExtension: ...
    def __init__(
        self,
        *,
        jfrog_tenant_id: builtins.str = ...,
        token: builtins.str = ...,
        token_scope_extension: global___TokenScopeExtension | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["token_scope_extension", b"token_scope_extension"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["jfrog_tenant_id", b"jfrog_tenant_id", "token", b"token", "token_scope_extension", b"token_scope_extension"]) -> None: ...

global___PersistTokenClaimsSpec = PersistTokenClaimsSpec

class JFrogTokenRevokeSpec(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    JFROG_TENANT_ID_FIELD_NUMBER: builtins.int
    TOKEN_FIELD_NUMBER: builtins.int
    TOKEN_ID_FIELD_NUMBER: builtins.int
    jfrog_tenant_id: builtins.str
    """JFrog tenant id"""
    token: builtins.str
    """Revoke by explicit token"""
    token_id: builtins.str
    """Revoke by token id"""
    def __init__(
        self,
        *,
        jfrog_tenant_id: builtins.str = ...,
        token: builtins.str = ...,
        token_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["token", b"token", "token_descriptor_type", b"token_descriptor_type", "token_id", b"token_id"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["jfrog_tenant_id", b"jfrog_tenant_id", "token", b"token", "token_descriptor_type", b"token_descriptor_type", "token_id", b"token_id"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["token_descriptor_type", b"token_descriptor_type"]) -> typing_extensions.Literal["token", "token_id"] | None: ...

global___JFrogTokenRevokeSpec = JFrogTokenRevokeSpec

class RepositoryTokenSpec(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    KEY_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    PERMISSIONS_FIELD_NUMBER: builtins.int
    key: builtins.str
    """Artifactory repository key"""
    type: global___RepositoryType.ValueType
    """Artifactory repository type"""
    @property
    def permissions(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___JFrogPermissionType.ValueType]: ...
    def __init__(
        self,
        *,
        key: builtins.str = ...,
        type: global___RepositoryType.ValueType = ...,
        permissions: collections.abc.Iterable[global___JFrogPermissionType.ValueType] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "permissions", b"permissions", "type", b"type"]) -> None: ...

global___RepositoryTokenSpec = RepositoryTokenSpec

class JFrogTokenTTLSpec(google.protobuf.message.Message):
    """//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ttl spec
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EXPIRATION_TIME_FIELD_NUMBER: builtins.int
    REFRESHABLE_FIELD_NUMBER: builtins.int
    @property
    def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    refreshable: builtins.bool
    """Is token refreshable.
    If true, a refresh token will be added to the response
    """
    def __init__(
        self,
        *,
        expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        refreshable: builtins.bool = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["expiration_time", b"expiration_time", "optional_expiration_time", b"optional_expiration_time"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["expiration_time", b"expiration_time", "optional_expiration_time", b"optional_expiration_time", "refreshable", b"refreshable"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["optional_expiration_time", b"optional_expiration_time"]) -> typing_extensions.Literal["expiration_time"] | None: ...

global___JFrogTokenTTLSpec = JFrogTokenTTLSpec

class SubjectAndScopeSource(google.protobuf.message.Message):
    """//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    subject & scope
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TOKEN_FIELD_NUMBER: builtins.int
    TOKEN_ID_FIELD_NUMBER: builtins.int
    SUBJECT_AND_SCOPE_FIELD_NUMBER: builtins.int
    TOKEN_SCOPE_EXTENSION_FIELD_NUMBER: builtins.int
    token: builtins.str
    """Subject and scope will be derived from the claims of the given token"""
    token_id: builtins.str
    """Subject and scope will be derived from the claims of the token represented by the given token_id"""
    @property
    def subject_and_scope(self) -> global___ExplicitSubjectAndScope:
        """Explicit Subject and scope"""
    @property
    def token_scope_extension(self) -> global___TokenScopeExtension:
        """Token with additional scopes"""
    def __init__(
        self,
        *,
        token: builtins.str = ...,
        token_id: builtins.str = ...,
        subject_and_scope: global___ExplicitSubjectAndScope | None = ...,
        token_scope_extension: global___TokenScopeExtension | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["source", b"source", "subject_and_scope", b"subject_and_scope", "token", b"token", "token_id", b"token_id", "token_scope_extension", b"token_scope_extension"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["source", b"source", "subject_and_scope", b"subject_and_scope", "token", b"token", "token_id", b"token_id", "token_scope_extension", b"token_scope_extension"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["source", b"source"]) -> typing_extensions.Literal["token", "token_id", "subject_and_scope", "token_scope_extension"] | None: ...

global___SubjectAndScopeSource = SubjectAndScopeSource

class ExplicitSubjectAndScope(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SUBJECT_FIELD_NUMBER: builtins.int
    SCOPES_FIELD_NUMBER: builtins.int
    subject: builtins.str
    scopes: builtins.str
    """The requested space separated scopes"""
    def __init__(
        self,
        *,
        subject: builtins.str = ...,
        scopes: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["optional_subject", b"optional_subject", "subject", b"subject"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["optional_subject", b"optional_subject", "scopes", b"scopes", "subject", b"subject"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["optional_subject", b"optional_subject"]) -> typing_extensions.Literal["subject"] | None: ...

global___ExplicitSubjectAndScope = ExplicitSubjectAndScope

class JFrogTokenAudiences(google.protobuf.message.Message):
    """//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    audience
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    AUDIENCES_FIELD_NUMBER: builtins.int
    @property
    def audiences(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___JFrogTokenAudience]:
        """Token audiences"""
    def __init__(
        self,
        *,
        audiences: collections.abc.Iterable[global___JFrogTokenAudience] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["audiences", b"audiences"]) -> None: ...

global___JFrogTokenAudiences = JFrogTokenAudiences

class JFrogTokenAudience(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    JFROG_ML_FIELD_NUMBER: builtins.int
    ARTIFACTORY_FIELD_NUMBER: builtins.int
    XRAY_FIELD_NUMBER: builtins.int
    @property
    def jfrog_ml(self) -> global___JFrogTokenAudienceJFrogML:
        """JFrogML audience"""
    @property
    def artifactory(self) -> global___JFrogTokenAudienceArtifactory:
        """Artifactory audience"""
    @property
    def xray(self) -> global___JFrogTokenAudienceXRay:
        """XRay audience"""
    def __init__(
        self,
        *,
        jfrog_ml: global___JFrogTokenAudienceJFrogML | None = ...,
        artifactory: global___JFrogTokenAudienceArtifactory | None = ...,
        xray: global___JFrogTokenAudienceXRay | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["artifactory", b"artifactory", "jfrog_ml", b"jfrog_ml", "type", b"type", "xray", b"xray"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["artifactory", b"artifactory", "jfrog_ml", b"jfrog_ml", "type", b"type", "xray", b"xray"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["type", b"type"]) -> typing_extensions.Literal["jfrog_ml", "artifactory", "xray"] | None: ...

global___JFrogTokenAudience = JFrogTokenAudience

class JFrogTokenAudienceArtifactory(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...

global___JFrogTokenAudienceArtifactory = JFrogTokenAudienceArtifactory

class JFrogTokenAudienceXRay(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...

global___JFrogTokenAudienceXRay = JFrogTokenAudienceXRay

class JFrogTokenAudienceJFrogML(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...

global___JFrogTokenAudienceJFrogML = JFrogTokenAudienceJFrogML

class TokenScopeExtension(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TOKEN_FIELD_NUMBER: builtins.int
    ADDITIONAL_SCOPES_FIELD_NUMBER: builtins.int
    token: builtins.str
    """The given token"""
    @property
    def additional_scopes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """A list of scopes to add to the given token"""
    def __init__(
        self,
        *,
        token: builtins.str = ...,
        additional_scopes: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["additional_scopes", b"additional_scopes", "token", b"token"]) -> None: ...

global___TokenScopeExtension = TokenScopeExtension
