# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .rate_limit_policy_configuration import RateLimitPolicyConfiguration
from .rate_limit_policy_consumer_enum import RateLimitPolicyConsumerEnum
from .rate_limit_policy_resource_enum import RateLimitPolicyResourceEnum


class UpdateRateLimitPolicyResponseContent(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Unique identifier for the Rate Limit Policy.
    """

    resource: RateLimitPolicyResourceEnum
    consumer: RateLimitPolicyConsumerEnum
    consumer_selector: str = pydantic.Field()
    """
    Identifier or category within the consumer to which the policy applies. Supported values: `client_id:<client_id>` to target a specific client by ID, `client_id:<cimd_uri>` to target a CIMD client by URI, `cimd_clients` to target all CIMD clients, `third_party_clients` to target all third-party clients, or `default` to apply the policy to any consumer identifier not otherwise explicitly targeted.
    """

    configuration: RateLimitPolicyConfiguration
    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    The date and time when the rate limit policy was created.
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    The date and time when the rate limit policy was last updated.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
