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

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .aggregation import Aggregation, Aggregation_Count, Aggregation_Last, Aggregation_Max, Aggregation_Sum
    from .amount import Amount
    from .billing_state_response import BillingStateResponse
    from .count_aggregation_pricing_metric_interface import CountAggregationPricingMetricInterface
    from .count_aggregation_pricing_metric_resource import CountAggregationPricingMetricResource
    from .create_customer_portal_session_response import CreateCustomerPortalSessionResponse
    from .create_fixed_rate_request import CreateFixedRateRequest
    from .create_simple_usage_based_rate_request import CreateSimpleUsageBasedRateRequest
    from .create_subject_response import CreateSubjectResponse
    from .create_subscription_checkout_session_response import CreateSubscriptionCheckoutSessionResponse
    from .custom_aggregation_pricing_metric_interface import CustomAggregationPricingMetricInterface
    from .fixed_rate_interface import FixedRateInterface
    from .flat_price import FlatPrice
    from .http_validation_error import HttpValidationError
    from .invoice_line_item_resource import InvoiceLineItemResource
    from .invoice_resource import InvoiceResource
    from .invoice_status import InvoiceStatus
    from .last_aggregation_pricing_metric_interface import LastAggregationPricingMetricInterface
    from .last_aggregation_pricing_metric_resource import LastAggregationPricingMetricResource
    from .list_invoices_response import ListInvoicesResponse
    from .list_pricing_metrics_response import ListPricingMetricsResponse
    from .list_rate_cards_response import ListRateCardsResponse
    from .list_subjects_response import ListSubjectsResponse
    from .list_subscriptions_response import ListSubscriptionsResponse
    from .max_aggregation_pricing_metric_interface import MaxAggregationPricingMetricInterface
    from .max_aggregation_pricing_metric_resource import MaxAggregationPricingMetricResource
    from .package_price import PackagePrice
    from .package_price_input_rounding_behavior import PackagePriceInputRoundingBehavior
    from .package_price_output_rounding_behavior import PackagePriceOutputRoundingBehavior
    from .period import Period
    from .period_resource import PeriodResource
    from .price import Price, Price_Flat, Price_Package
    from .pricing_metric_resource import PricingMetricResource
    from .pricing_metric_summary_resource import PricingMetricSummaryResource
    from .rate_card_resource import RateCardResource
    from .rate_card_resource_billing_interval import RateCardResourceBillingInterval
    from .rate_card_resource_usage_based_rates_item import (
        RateCardResourceUsageBasedRatesItem,
        RateCardResourceUsageBasedRatesItem_Simple,
    )
    from .simple_usage_based_rate_interface import SimpleUsageBasedRateInterface
    from .subject_resource import SubjectResource
    from .subscription_resource import SubscriptionResource
    from .subscription_status import SubscriptionStatus
    from .sum_aggregation_pricing_metric_interface import SumAggregationPricingMetricInterface
    from .sum_aggregation_pricing_metric_resource import SumAggregationPricingMetricResource
    from .validation_error import ValidationError
    from .validation_error_loc_item import ValidationErrorLocItem
_dynamic_imports: typing.Dict[str, str] = {
    "Aggregation": ".aggregation",
    "Aggregation_Count": ".aggregation",
    "Aggregation_Last": ".aggregation",
    "Aggregation_Max": ".aggregation",
    "Aggregation_Sum": ".aggregation",
    "Amount": ".amount",
    "BillingStateResponse": ".billing_state_response",
    "CountAggregationPricingMetricInterface": ".count_aggregation_pricing_metric_interface",
    "CountAggregationPricingMetricResource": ".count_aggregation_pricing_metric_resource",
    "CreateCustomerPortalSessionResponse": ".create_customer_portal_session_response",
    "CreateFixedRateRequest": ".create_fixed_rate_request",
    "CreateSimpleUsageBasedRateRequest": ".create_simple_usage_based_rate_request",
    "CreateSubjectResponse": ".create_subject_response",
    "CreateSubscriptionCheckoutSessionResponse": ".create_subscription_checkout_session_response",
    "CustomAggregationPricingMetricInterface": ".custom_aggregation_pricing_metric_interface",
    "FixedRateInterface": ".fixed_rate_interface",
    "FlatPrice": ".flat_price",
    "HttpValidationError": ".http_validation_error",
    "InvoiceLineItemResource": ".invoice_line_item_resource",
    "InvoiceResource": ".invoice_resource",
    "InvoiceStatus": ".invoice_status",
    "LastAggregationPricingMetricInterface": ".last_aggregation_pricing_metric_interface",
    "LastAggregationPricingMetricResource": ".last_aggregation_pricing_metric_resource",
    "ListInvoicesResponse": ".list_invoices_response",
    "ListPricingMetricsResponse": ".list_pricing_metrics_response",
    "ListRateCardsResponse": ".list_rate_cards_response",
    "ListSubjectsResponse": ".list_subjects_response",
    "ListSubscriptionsResponse": ".list_subscriptions_response",
    "MaxAggregationPricingMetricInterface": ".max_aggregation_pricing_metric_interface",
    "MaxAggregationPricingMetricResource": ".max_aggregation_pricing_metric_resource",
    "PackagePrice": ".package_price",
    "PackagePriceInputRoundingBehavior": ".package_price_input_rounding_behavior",
    "PackagePriceOutputRoundingBehavior": ".package_price_output_rounding_behavior",
    "Period": ".period",
    "PeriodResource": ".period_resource",
    "Price": ".price",
    "Price_Flat": ".price",
    "Price_Package": ".price",
    "PricingMetricResource": ".pricing_metric_resource",
    "PricingMetricSummaryResource": ".pricing_metric_summary_resource",
    "RateCardResource": ".rate_card_resource",
    "RateCardResourceBillingInterval": ".rate_card_resource_billing_interval",
    "RateCardResourceUsageBasedRatesItem": ".rate_card_resource_usage_based_rates_item",
    "RateCardResourceUsageBasedRatesItem_Simple": ".rate_card_resource_usage_based_rates_item",
    "SimpleUsageBasedRateInterface": ".simple_usage_based_rate_interface",
    "SubjectResource": ".subject_resource",
    "SubscriptionResource": ".subscription_resource",
    "SubscriptionStatus": ".subscription_status",
    "SumAggregationPricingMetricInterface": ".sum_aggregation_pricing_metric_interface",
    "SumAggregationPricingMetricResource": ".sum_aggregation_pricing_metric_resource",
    "ValidationError": ".validation_error",
    "ValidationErrorLocItem": ".validation_error_loc_item",
}


def __getattr__(attr_name: str) -> typing.Any:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
    try:
        module = import_module(module_name, __package__)
        if module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    except ImportError as e:
        raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
    except AttributeError as e:
        raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)


__all__ = [
    "Aggregation",
    "Aggregation_Count",
    "Aggregation_Last",
    "Aggregation_Max",
    "Aggregation_Sum",
    "Amount",
    "BillingStateResponse",
    "CountAggregationPricingMetricInterface",
    "CountAggregationPricingMetricResource",
    "CreateCustomerPortalSessionResponse",
    "CreateFixedRateRequest",
    "CreateSimpleUsageBasedRateRequest",
    "CreateSubjectResponse",
    "CreateSubscriptionCheckoutSessionResponse",
    "CustomAggregationPricingMetricInterface",
    "FixedRateInterface",
    "FlatPrice",
    "HttpValidationError",
    "InvoiceLineItemResource",
    "InvoiceResource",
    "InvoiceStatus",
    "LastAggregationPricingMetricInterface",
    "LastAggregationPricingMetricResource",
    "ListInvoicesResponse",
    "ListPricingMetricsResponse",
    "ListRateCardsResponse",
    "ListSubjectsResponse",
    "ListSubscriptionsResponse",
    "MaxAggregationPricingMetricInterface",
    "MaxAggregationPricingMetricResource",
    "PackagePrice",
    "PackagePriceInputRoundingBehavior",
    "PackagePriceOutputRoundingBehavior",
    "Period",
    "PeriodResource",
    "Price",
    "Price_Flat",
    "Price_Package",
    "PricingMetricResource",
    "PricingMetricSummaryResource",
    "RateCardResource",
    "RateCardResourceBillingInterval",
    "RateCardResourceUsageBasedRatesItem",
    "RateCardResourceUsageBasedRatesItem_Simple",
    "SimpleUsageBasedRateInterface",
    "SubjectResource",
    "SubscriptionResource",
    "SubscriptionStatus",
    "SumAggregationPricingMetricInterface",
    "SumAggregationPricingMetricResource",
    "ValidationError",
    "ValidationErrorLocItem",
]
