from typing import Any

from google.auth import credentials as credentials, jwt as jwt

class Credentials(
    credentials.Signing, credentials.Scoped, credentials.CredentialsWithQuotaProject
):
    def __init__(
        self,
        signer,
        service_account_email,
        token_uri,
        scopes: Any | None = ...,
        default_scopes: Any | None = ...,
        subject: Any | None = ...,
        project_id: Any | None = ...,
        quota_project_id: Any | None = ...,
        additional_claims: Any | None = ...,
        always_use_jwt_access: bool = ...,
    ) -> None: ...
    @classmethod
    def from_service_account_info(cls, info, **kwargs): ...
    @classmethod
    def from_service_account_file(cls, filename, **kwargs): ...
    @property
    def service_account_email(self): ...
    @property
    def project_id(self): ...
    @property
    def requires_scopes(self): ...
    def with_scopes(self, scopes, default_scopes: Any | None = ...): ...
    def with_always_use_jwt_access(self, always_use_jwt_access): ...
    def with_subject(self, subject): ...
    def with_claims(self, additional_claims): ...
    def with_quota_project(self, quota_project_id): ...
    token: Any
    expiry: Any
    def refresh(self, request) -> None: ...
    def sign_bytes(self, message): ...
    @property
    def signer(self): ...
    @property
    def signer_email(self): ...

class IDTokenCredentials(credentials.Signing, credentials.CredentialsWithQuotaProject):
    def __init__(
        self,
        signer,
        service_account_email,
        token_uri,
        target_audience,
        additional_claims: Any | None = ...,
        quota_project_id: Any | None = ...,
    ) -> None: ...
    @classmethod
    def from_service_account_info(cls, info, **kwargs): ...
    @classmethod
    def from_service_account_file(cls, filename, **kwargs): ...
    def with_target_audience(self, target_audience): ...
    def with_quota_project(self, quota_project_id): ...
    token: Any
    expiry: Any
    def refresh(self, request) -> None: ...
    @property
    def service_account_email(self): ...
    def sign_bytes(self, message): ...
    @property
    def signer(self): ...
    @property
    def signer_email(self): ...
