"""
Python SDK for OpenFGA

API version: 1.x
Website: https://openfga.dev
Documentation: https://openfga.dev/docs
Support: https://openfga.dev/community
License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE)

NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
"""

from typing import Final


# Version of the OpenFGA Python SDK.
SDK_VERSION: Final[str] = "0.9.9"

# User agent used in HTTP requests.
USER_AGENT: Final[str] = "openfga-sdk python/0.9.9"

# Example API domain for documentation/tests.
SAMPLE_BASE_DOMAIN: Final[str] = "fga.example"

# API URL used for tests.
TEST_API_URL: Final[str] = f"https://api.{SAMPLE_BASE_DOMAIN}"

# API Token Issuer URL used for tests.
TEST_ISSUER_URL: Final[str] = f"https://issuer.{SAMPLE_BASE_DOMAIN}"

# Default API URL.
DEFAULT_API_URL: Final[str] = "http://localhost:8080"

# Retry configuration

# Maximum allowed number of retries for HTTP requests.
RETRY_MAX_ALLOWED_NUMBER: Final[int] = 15

# Default maximum number of retries for HTTP requests.
DEFAULT_MAX_RETRY: Final[int] = 3

# Default minimum wait time between retries in milliseconds.
DEFAULT_MIN_WAIT_IN_MS: Final[int] = 100

# Maximum backoff time in seconds.
MAX_BACKOFF_TIME_IN_SEC: Final[int] = 120

# Maximum allowable duration for retry headers in seconds.
RETRY_HEADER_MAX_ALLOWABLE_DURATION_IN_SEC: Final[int] = 1800

# Standard HTTP header for retry-after.
RETRY_AFTER_HEADER_NAME: Final[str] = "Retry-After"

# Rate limit reset header name.
RATE_LIMIT_RESET_HEADER_NAME: Final[str] = "X-RateLimit-Reset"

# Alternative rate limit reset header name.
RATE_LIMIT_RESET_ALT_HEADER_NAME: Final[str] = "X-Rate-Limit-Reset"

# Client methods

# Maximum number of parallel requests for a single method.
CLIENT_MAX_METHOD_PARALLEL_REQUESTS: Final[int] = 10

# Maximum batch size for batch requests.
CLIENT_MAX_BATCH_SIZE: Final[int] = 50

# Header used to identify the client method.
CLIENT_METHOD_HEADER: Final[str] = "X-OpenFGA-Client-Method"

# Header used to identify bulk requests.
CLIENT_BULK_REQUEST_ID_HEADER: Final[str] = "X-OpenFGA-Client-Bulk-Request-Id"

# Connection options

# Default timeout for HTTP requests in milliseconds.
DEFAULT_REQUEST_TIMEOUT_IN_MS: Final[int] = 10000

# Default connection timeout in milliseconds.
DEFAULT_CONNECTION_TIMEOUT_IN_MS: Final[int] = 10000

# Token management

# Buffer time in seconds before token expiry to consider it expired.
TOKEN_EXPIRY_THRESHOLD_BUFFER_IN_SEC: Final[int] = 300

# Jitter time in seconds to add randomness to token expiry checks.
TOKEN_EXPIRY_JITTER_IN_SEC: Final[int] = 300

# FGA Response Headers

# Response header name for query duration in milliseconds.
QUERY_DURATION_HEADER_NAME: Final[str] = "fga-query-duration-ms"
