# Generated by ariadne-codegen
# Source: ../api-client-schema/src/generated/schema.graphql

from typing import Any, List, Optional

from stigg._vendors.pydantic import Field

from .base_model import BaseModel
from .enums import (
    AccessDeniedReason,
    AddonSortFields,
    AggregationFunction,
    Alignment,
    ApiKeySortFields,
    BillingAnchor,
    BillingCadence,
    BillingModel,
    BillingPeriod,
    ConditionOperation,
    CouponSortFields,
    CouponStatus,
    CouponType,
    Currency,
    CustomerResourceSortFields,
    CustomerSortFields,
    CustomerSubscriptionSortFields,
    Department,
    EntitlementBehavior,
    EntitlementResetPeriod,
    EntitySelectionMode,
    EnvironmentProvisionStatus,
    EnvironmentSortFields,
    EnvironmentType,
    EventLogSortFields,
    EventLogType,
    ExperimentSortFields,
    ExperimentStatus,
    FeatureSortFields,
    FeatureStatus,
    FeatureType,
    FontWeight,
    HookSortFields,
    HookStatus,
    ImportIntegrationTaskSortFields,
    IntegrationSortFields,
    MemberSortFields,
    MeterType,
    MonthlyAccordingTo,
    OverageBillingPeriod,
    PackageDTOSortFields,
    PackageEntitlementSortFields,
    PackageGroupSortFields,
    PackageGroupStatus,
    PackageStatus,
    PaymentCollection,
    PaymentCollectionMethod,
    PlanSortFields,
    PriceSortFields,
    PricingType,
    ProductSortFields,
    PromotionalEntitlementPeriod,
    PromotionalEntitlementSortFields,
    PromotionalEntitlementStatus,
    ProrationBehavior,
    PublishMigrationType,
    ScheduleStrategy,
    SortDirection,
    SortNulls,
    SubscriptionAddonSortFields,
    SubscriptionCancellationAction,
    SubscriptionCancellationTime,
    SubscriptionCancelReason,
    SubscriptionEndSetup,
    SubscriptionEntitlementSortFields,
    SubscriptionMigrationTaskSortFields,
    SubscriptionMigrationTime,
    SubscriptionPriceSortFields,
    SubscriptionScheduleStatus,
    SubscriptionStartSetup,
    SubscriptionStatus,
    TaskStatus,
    TaskType,
    TiersMode,
    TrialPeriodUnits,
    UsageMeasurementSortFields,
    UsageUpdateBehavior,
    VendorIdentifier,
    WeeklyAccordingTo,
    WidgetType,
    YearlyAccordingTo,
)


class AddCompatibleAddonsToPlanInput(BaseModel):
    id: str
    relation_ids: List[str] = Field(alias="relationIds")


class AddonCreateInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    aws_marketplace_plan_dimension: Optional[str] = Field(
        alias="awsMarketplacePlanDimension", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    dependencies: Optional[List[str]] = None
    description: Optional[str] = None
    display_name: str = Field(alias="displayName")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    max_quantity: Optional[float] = Field(alias="maxQuantity", default=None)
    pricing_type: Optional[PricingType] = Field(alias="pricingType", default=None)
    product_id: str = Field(alias="productId")
    ref_id: Optional[str] = Field(alias="refId", default=None)
    status: Optional[PackageStatus] = None


class AddonFilter(BaseModel):
    and_: Optional[List["AddonFilter"]] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["AddonFilter"]] = Field(alias="or", default=None)
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class AddonSort(BaseModel):
    direction: SortDirection
    field: AddonSortFields
    nulls: Optional[SortNulls] = None


class AddonUpdateInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    dependencies: Optional[List[str]] = None
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    id: str
    max_quantity: Optional[float] = Field(alias="maxQuantity", default=None)
    status: Optional[PackageStatus] = None


class Address(BaseModel):
    address_line_1: Optional[str] = Field(alias="addressLine1", default=None)
    address_line_2: Optional[str] = Field(alias="addressLine2", default=None)
    city: Optional[str] = None
    country: Optional[str] = None
    phone_number: Optional[str] = Field(alias="phoneNumber", default=None)
    postal_code: Optional[str] = Field(alias="postalCode", default=None)
    state: Optional[str] = None


class AggregatedEventsByCustomerInput(BaseModel):
    aggregation: "MeterAggregation"
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    environment_id: str = Field(alias="environmentId")
    filters: List["MeterFilterDefinitionInput"]


class ApiKeyFilter(BaseModel):
    and_: Optional[List["ApiKeyFilter"]] = Field(alias="and", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["ApiKeyFilter"]] = Field(alias="or", default=None)


class ApiKeySort(BaseModel):
    direction: SortDirection
    field: ApiKeySortFields
    nulls: Optional[SortNulls] = None


class ApplySubscriptionInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    addons: Optional[List["SubscriptionAddonInput"]] = None
    await_payment_confirmation: Optional[bool] = Field(
        alias="awaitPaymentConfirmation", default=True
    )
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    budget: Optional["BudgetConfigurationInput"] = None
    customer_id: str = Field(alias="customerId")
    minimum_spend: Optional["SubscriptionMinimumSpendValueInput"] = Field(
        alias="minimumSpend", default=None
    )
    payment_collection_method: Optional[PaymentCollectionMethod] = Field(
        alias="paymentCollectionMethod", default=PaymentCollectionMethod.CHARGE
    )
    payment_method_id: Optional[str] = Field(alias="paymentMethodId", default=None)
    plan_id: str = Field(alias="planId")
    price_overrides: Optional[List["PriceOverrideInput"]] = Field(
        alias="priceOverrides", default=None
    )
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    schedule_strategy: Optional[ScheduleStrategy] = Field(
        alias="scheduleStrategy", default=None
    )
    skip_trial: Optional[bool] = Field(alias="skipTrial", default=False)
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    subscription_entitlements: Optional[List["SubscriptionEntitlementInput"]] = Field(
        alias="subscriptionEntitlements", default=None
    )
    trial_override_configuration: Optional["TrialOverrideConfigurationInput"] = Field(
        alias="trialOverrideConfiguration", default=None
    )
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class ArchiveCouponInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    ref_id: str = Field(alias="refId")


class ArchiveCustomerInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class ArchiveEnvironmentInput(BaseModel):
    id: Optional[str] = None
    slug: Optional[str] = None


class ArchiveFeatureInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    id: str


class ArchivePackageGroup(BaseModel):
    environment_id: str = Field(alias="environmentId")
    package_group_id: str = Field(alias="packageGroupId")


class ArchivePlanInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    id: str


class AttachCustomerPaymentMethodInput(BaseModel):
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    payment_method_id: str = Field(alias="paymentMethodId")
    ref_id: Optional[str] = Field(alias="refId", default=None)
    vendor_identifier: VendorIdentifier = Field(alias="vendorIdentifier")


class AwsMarketplaceCredentialsInput(BaseModel):
    aws_role_arn: str = Field(alias="awsRoleArn")


class BigQueryCredentialsInput(BaseModel):
    credentials_json: str = Field(alias="credentialsJson")
    dataset_id: str = Field(alias="datasetId")
    dataset_location: str = Field(alias="datasetLocation")
    gcs_bucket_name: str = Field(alias="gcsBucketName")
    gcs_bucket_path: str = Field(alias="gcsBucketPath")
    hmac_key_access_id: str = Field(alias="hmacKeyAccessId")
    hmac_key_secret: str = Field(alias="hmacKeySecret")
    project_id: str = Field(alias="projectId")


class BillableFeatureInput(BaseModel):
    feature_id: str = Field(alias="featureId")
    quantity: float


class BillingAddress(BaseModel):
    city: Optional[str] = None
    country: Optional[str] = None
    line_1: Optional[str] = Field(alias="line1", default=None)
    line_2: Optional[str] = Field(alias="line2", default=None)
    postal_code: Optional[str] = Field(alias="postalCode", default=None)
    state: Optional[str] = None


class BillingCadenceFilterComparison(BaseModel):
    eq: Optional[BillingCadence] = None
    gt: Optional[BillingCadence] = None
    gte: Optional[BillingCadence] = None
    i_like: Optional[BillingCadence] = Field(alias="iLike", default=None)
    in_: Optional[List[BillingCadence]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[BillingCadence] = None
    lt: Optional[BillingCadence] = None
    lte: Optional[BillingCadence] = None
    neq: Optional[BillingCadence] = None
    not_i_like: Optional[BillingCadence] = Field(alias="notILike", default=None)
    not_in: Optional[List[BillingCadence]] = Field(alias="notIn", default=None)
    not_like: Optional[BillingCadence] = Field(alias="notLike", default=None)


class BillingModelFilterComparison(BaseModel):
    eq: Optional[BillingModel] = None
    gt: Optional[BillingModel] = None
    gte: Optional[BillingModel] = None
    i_like: Optional[BillingModel] = Field(alias="iLike", default=None)
    in_: Optional[List[BillingModel]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[BillingModel] = None
    lt: Optional[BillingModel] = None
    lte: Optional[BillingModel] = None
    neq: Optional[BillingModel] = None
    not_i_like: Optional[BillingModel] = Field(alias="notILike", default=None)
    not_in: Optional[List[BillingModel]] = Field(alias="notIn", default=None)
    not_like: Optional[BillingModel] = Field(alias="notLike", default=None)


class BillingPeriodFilterComparison(BaseModel):
    eq: Optional[BillingPeriod] = None
    gt: Optional[BillingPeriod] = None
    gte: Optional[BillingPeriod] = None
    i_like: Optional[BillingPeriod] = Field(alias="iLike", default=None)
    in_: Optional[List[BillingPeriod]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[BillingPeriod] = None
    lt: Optional[BillingPeriod] = None
    lte: Optional[BillingPeriod] = None
    neq: Optional[BillingPeriod] = None
    not_i_like: Optional[BillingPeriod] = Field(alias="notILike", default=None)
    not_in: Optional[List[BillingPeriod]] = Field(alias="notIn", default=None)
    not_like: Optional[BillingPeriod] = Field(alias="notLike", default=None)


class BooleanFieldComparison(BaseModel):
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)


class BudgetConfigurationInput(BaseModel):
    has_soft_limit: bool = Field(alias="hasSoftLimit")
    limit: float


class ChargeSubscriptionOveragesInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    subscription_id: str = Field(alias="subscriptionId")
    until_date: Optional[Any] = Field(alias="untilDate", default=None)


class CheckoutConfigurationInput(BaseModel):
    content: Optional["CheckoutContentInput"] = None
    custom_css: Optional[str] = Field(alias="customCss", default=None)
    palette: Optional["CheckoutPaletteInput"] = None
    typography: Optional["TypographyConfigurationInput"] = None


class CheckoutContentInput(BaseModel):
    collect_phone_number: Optional[bool] = Field(
        alias="collectPhoneNumber", default=None
    )


class CheckoutOptions(BaseModel):
    allow_promo_codes: Optional[bool] = Field(alias="allowPromoCodes", default=False)
    allow_tax_id_collection: Optional[bool] = Field(
        alias="allowTaxIdCollection", default=False
    )
    cancel_url: str = Field(alias="cancelUrl")
    collect_billing_address: Optional[bool] = Field(
        alias="collectBillingAddress", default=False
    )
    collect_phone_number: Optional[bool] = Field(
        alias="collectPhoneNumber", default=False
    )
    reference_id: Optional[str] = Field(alias="referenceId", default=None)
    success_url: str = Field(alias="successUrl")


class CheckoutPaletteInput(BaseModel):
    background_color: Optional[str] = Field(alias="backgroundColor", default=None)
    border_color: Optional[str] = Field(alias="borderColor", default=None)
    primary: Optional[str] = None
    summary_background_color: Optional[str] = Field(
        alias="summaryBackgroundColor", default=None
    )
    text_color: Optional[str] = Field(alias="textColor", default=None)


class CheckoutStateInput(BaseModel):
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    customer_id: str = Field(alias="customerId")
    plan_id: str = Field(alias="planId")
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class ClearCustomerPersistentCacheInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class CouponFilter(BaseModel):
    and_: Optional[List["CouponFilter"]] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    customers: Optional["CouponFilterCustomerFilter"] = None
    description: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["CouponFilter"]] = Field(alias="or", default=None)
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["CouponStatusFilterComparison"] = None
    type: Optional["CouponTypeFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CouponFilterCustomerFilter(BaseModel):
    and_: Optional[List["CouponFilterCustomerFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_hubspot_company_id: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyId", default=None
    )
    crm_hubspot_company_url: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyUrl", default=None
    )
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    deleted_at: Optional["DateFieldComparison"] = Field(alias="deletedAt", default=None)
    email: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["CouponFilterCustomerFilter"]] = Field(alias="or", default=None)
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    search_query: Optional["CustomerSearchQueryFilterComparison"] = Field(
        alias="searchQuery", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CouponSort(BaseModel):
    direction: SortDirection
    field: CouponSortFields
    nulls: Optional[SortNulls] = None


class CouponStatusFilterComparison(BaseModel):
    eq: Optional[CouponStatus] = None
    gt: Optional[CouponStatus] = None
    gte: Optional[CouponStatus] = None
    i_like: Optional[CouponStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[CouponStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[CouponStatus] = None
    lt: Optional[CouponStatus] = None
    lte: Optional[CouponStatus] = None
    neq: Optional[CouponStatus] = None
    not_i_like: Optional[CouponStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[CouponStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[CouponStatus] = Field(alias="notLike", default=None)


class CouponTypeFilterComparison(BaseModel):
    eq: Optional[CouponType] = None
    gt: Optional[CouponType] = None
    gte: Optional[CouponType] = None
    i_like: Optional[CouponType] = Field(alias="iLike", default=None)
    in_: Optional[List[CouponType]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[CouponType] = None
    lt: Optional[CouponType] = None
    lte: Optional[CouponType] = None
    neq: Optional[CouponType] = None
    not_i_like: Optional[CouponType] = Field(alias="notILike", default=None)
    not_in: Optional[List[CouponType]] = Field(alias="notIn", default=None)
    not_like: Optional[CouponType] = Field(alias="notLike", default=None)


class CreateCouponInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    description: Optional[str] = None
    discount_value: float = Field(alias="discountValue")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: str
    ref_id: str = Field(alias="refId")
    type: CouponType


class CreateEnvironment(BaseModel):
    color: Optional[str] = None
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    harden_client_access_enabled: Optional[bool] = Field(
        alias="hardenClientAccessEnabled", default=None
    )
    id: Optional[str] = None
    provision_status: Optional[EnvironmentProvisionStatus] = Field(
        alias="provisionStatus", default=None
    )
    slug: Optional[str] = None
    type: Optional[EnvironmentType] = EnvironmentType.DEVELOPMENT


class CreateEnvironmentOptions(BaseModel):
    create_default_product: Optional[bool] = Field(
        alias="createDefaultProduct", default=None
    )


class CreateExperimentInput(BaseModel):
    control_group_name: str = Field(alias="controlGroupName")
    description: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: str
    product_id: str = Field(alias="productId")
    product_settings: Optional["ProductSettingsInput"] = Field(
        alias="productSettings", default=None
    )
    variant_group_name: str = Field(alias="variantGroupName")
    variant_percentage: float = Field(alias="variantPercentage")


class CreateHook(BaseModel):
    configuration: Optional[Any] = None
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    description: Optional[str] = None
    endpoint: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    event_log_types: Optional[List[EventLogType]] = Field(
        alias="eventLogTypes", default=None
    )
    id: Optional[str] = None
    secret_key: Optional[str] = Field(alias="secretKey", default=None)
    status: Optional[HookStatus] = None


class CreateIntegrationInput(BaseModel):
    aws_marketplace_credentials: Optional["AwsMarketplaceCredentialsInput"] = Field(
        alias="awsMarketplaceCredentials", default=None
    )
    big_query_credentials: Optional["BigQueryCredentialsInput"] = Field(
        alias="bigQueryCredentials", default=None
    )
    environment_id: str = Field(alias="environmentId")
    hubspot_credentials: Optional["HubspotCredentialsInput"] = Field(
        alias="hubspotCredentials", default=None
    )
    salesforce_credentials: Optional["SalesforceCredentialsInput"] = Field(
        alias="salesforceCredentials", default=None
    )
    snowflake_credentials: Optional["SnowflakeCredentialsInput"] = Field(
        alias="snowflakeCredentials", default=None
    )
    stripe_credentials: Optional["StripeCredentialsInput"] = Field(
        alias="stripeCredentials", default=None
    )
    vendor_identifier: VendorIdentifier = Field(alias="vendorIdentifier")
    zuora_credentials: Optional["ZuoraCredentialsInput"] = Field(
        alias="zuoraCredentials", default=None
    )


class CreateManyPackageEntitlementsInput(BaseModel):
    package_entitlements: List["PackageEntitlementInput"] = Field(
        alias="packageEntitlements"
    )


class CreateManyPromotionalEntitlementsInput(BaseModel):
    promotional_entitlements: List["PromotionalEntitlementInput"] = Field(
        alias="promotionalEntitlements"
    )


class CreateMeter(BaseModel):
    aggregation: "MeterAggregation"
    filters: List["MeterFilterDefinitionInput"]


class CreateOneEnvironmentInput(BaseModel):
    environment: "CreateEnvironment"
    options: Optional["CreateEnvironmentOptions"] = None


class CreateOneFeatureInput(BaseModel):
    feature: "FeatureInput"


class CreateOneHookInput(BaseModel):
    hook: "CreateHook"


class CreateOneIntegrationInput(BaseModel):
    integration: "CreateIntegrationInput"


class CreateOneProductInput(BaseModel):
    product: "ProductCreateInput"


class CreateOrUpdateAwsMarketplaceProductInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    aws_dimensions_mapping: List["DimensionsMappingInput"] = Field(
        alias="awsDimensionsMapping"
    )
    aws_product_id: Optional[str] = Field(alias="awsProductId", default=None)
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    multiple_subscriptions: Optional[bool] = Field(
        alias="multipleSubscriptions", default=None
    )
    product_id: Optional[str] = Field(alias="productId", default=None)
    product_settings: Optional["ProductSettingsInput"] = Field(
        alias="productSettings", default=None
    )
    ref_id: Optional[str] = Field(alias="refId", default=None)


class CreatePackageGroup(BaseModel):
    description: Optional[str] = None
    display_name: str = Field(alias="displayName")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    package_group_id: str = Field(alias="packageGroupId")
    product_id: str = Field(alias="productId")


class CursorPaging(BaseModel):
    after: Optional[Any] = None
    before: Optional[Any] = None
    first: Optional[int] = None
    last: Optional[int] = None


class CustomerBillingInfo(BaseModel):
    billing_address: Optional["Address"] = Field(alias="billingAddress", default=None)
    currency: Optional[Currency] = None
    customer_name: Optional[str] = Field(alias="customerName", default=None)
    invoice_custom_fields: Optional[Any] = Field(
        alias="invoiceCustomFields", default=None
    )
    language: Optional[str] = None
    metadata: Optional[Any] = None
    payment_method_id: Optional[str] = Field(alias="paymentMethodId", default=None)
    shipping_address: Optional["Address"] = Field(alias="shippingAddress", default=None)
    tax_ids: Optional[List["TaxExempt"]] = Field(alias="taxIds", default=None)
    timezone: Optional[str] = None


class CustomerFilter(BaseModel):
    and_: Optional[List["CustomerFilter"]] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_hubspot_company_id: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyId", default=None
    )
    crm_hubspot_company_url: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyUrl", default=None
    )
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    deleted_at: Optional["DateFieldComparison"] = Field(alias="deletedAt", default=None)
    email: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["CustomerFilter"]] = Field(alias="or", default=None)
    promotional_entitlements: Optional[
        "CustomerFilterPromotionalEntitlementFilter"
    ] = Field(alias="promotionalEntitlements", default=None)
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    search_query: Optional["CustomerSearchQueryFilterComparison"] = Field(
        alias="searchQuery", default=None
    )
    subscriptions: Optional["CustomerFilterCustomerSubscriptionFilter"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CustomerFilterCustomerSubscriptionFilter(BaseModel):
    and_: Optional[List["CustomerFilterCustomerSubscriptionFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    cancel_reason: Optional["SubscriptionCancelReasonFilterComparison"] = Field(
        alias="cancelReason", default=None
    )
    cancellation_date: Optional["DateFieldComparison"] = Field(
        alias="cancellationDate", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    crm_link_url: Optional["StringFieldComparison"] = Field(
        alias="crmLinkUrl", default=None
    )
    current_billing_period_end: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodEnd", default=None
    )
    current_billing_period_start: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodStart", default=None
    )
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    effective_end_date: Optional["DateFieldComparison"] = Field(
        alias="effectiveEndDate", default=None
    )
    end_date: Optional["DateFieldComparison"] = Field(alias="endDate", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    old_billing_id: Optional["StringFieldComparison"] = Field(
        alias="oldBillingId", default=None
    )
    or_: Optional[List["CustomerFilterCustomerSubscriptionFilter"]] = Field(
        alias="or", default=None
    )
    payment_collection: Optional["PaymentCollectionFilterComparison"] = Field(
        alias="paymentCollection", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    start_date: Optional["DateFieldComparison"] = Field(alias="startDate", default=None)
    status: Optional["SubscriptionStatusFilterComparison"] = None
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    trial_end_date: Optional["DateFieldComparison"] = Field(
        alias="trialEndDate", default=None
    )


class CustomerFilterPromotionalEntitlementFilter(BaseModel):
    and_: Optional[List["CustomerFilterPromotionalEntitlementFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["CustomerFilterPromotionalEntitlementFilter"]] = Field(
        alias="or", default=None
    )
    status: Optional["PromotionalEntitlementStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CustomerInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    aws_marketplace_customer_id: Optional[str] = Field(
        alias="awsMarketplaceCustomerId", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["CustomerBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    coupon_ref_id: Optional[str] = Field(alias="couponRefId", default=None)
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    crm_id: Optional[str] = Field(alias="crmId", default=None)
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    email: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: Optional[str] = None
    ref_id: Optional[str] = Field(alias="refId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    should_sync_free: Optional[bool] = Field(alias="shouldSyncFree", default=False)


class CustomerPortalColorsPaletteInput(BaseModel):
    background_color: Optional[str] = Field(alias="backgroundColor", default=None)
    border_color: Optional[str] = Field(alias="borderColor", default=None)
    current_plan_background: Optional[str] = Field(
        alias="currentPlanBackground", default=None
    )
    icons_color: Optional[str] = Field(alias="iconsColor", default=None)
    paywall_background_color: Optional[str] = Field(
        alias="paywallBackgroundColor", default=None
    )
    primary: Optional[str] = None
    text_color: Optional[str] = Field(alias="textColor", default=None)


class CustomerPortalConfigurationInput(BaseModel):
    custom_css: Optional[str] = Field(alias="customCss", default=None)
    palette: Optional["CustomerPortalColorsPaletteInput"] = None
    typography: Optional["TypographyConfigurationInput"] = None


class CustomerPortalInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    product_id: Optional[str] = Field(alias="productId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class CustomerResourceFilter(BaseModel):
    and_: Optional[List["CustomerResourceFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    customer: Optional["CustomerResourceFilterCustomerFilter"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    or_: Optional[List["CustomerResourceFilter"]] = Field(alias="or", default=None)
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    subscriptions: Optional["CustomerResourceFilterCustomerSubscriptionFilter"] = None


class CustomerResourceFilterCustomerFilter(BaseModel):
    and_: Optional[List["CustomerResourceFilterCustomerFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_hubspot_company_id: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyId", default=None
    )
    crm_hubspot_company_url: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyUrl", default=None
    )
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    deleted_at: Optional["DateFieldComparison"] = Field(alias="deletedAt", default=None)
    email: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["CustomerResourceFilterCustomerFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    search_query: Optional["CustomerSearchQueryFilterComparison"] = Field(
        alias="searchQuery", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CustomerResourceFilterCustomerSubscriptionFilter(BaseModel):
    and_: Optional[List["CustomerResourceFilterCustomerSubscriptionFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    cancel_reason: Optional["SubscriptionCancelReasonFilterComparison"] = Field(
        alias="cancelReason", default=None
    )
    cancellation_date: Optional["DateFieldComparison"] = Field(
        alias="cancellationDate", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    crm_link_url: Optional["StringFieldComparison"] = Field(
        alias="crmLinkUrl", default=None
    )
    current_billing_period_end: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodEnd", default=None
    )
    current_billing_period_start: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodStart", default=None
    )
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    effective_end_date: Optional["DateFieldComparison"] = Field(
        alias="effectiveEndDate", default=None
    )
    end_date: Optional["DateFieldComparison"] = Field(alias="endDate", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    old_billing_id: Optional["StringFieldComparison"] = Field(
        alias="oldBillingId", default=None
    )
    or_: Optional[List["CustomerResourceFilterCustomerSubscriptionFilter"]] = Field(
        alias="or", default=None
    )
    payment_collection: Optional["PaymentCollectionFilterComparison"] = Field(
        alias="paymentCollection", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    start_date: Optional["DateFieldComparison"] = Field(alias="startDate", default=None)
    status: Optional["SubscriptionStatusFilterComparison"] = None
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    trial_end_date: Optional["DateFieldComparison"] = Field(
        alias="trialEndDate", default=None
    )


class CustomerResourceSort(BaseModel):
    direction: SortDirection
    field: CustomerResourceSortFields
    nulls: Optional[SortNulls] = None


class CustomerSearchQueryFilterComparison(BaseModel):
    i_like: Optional[str] = Field(alias="iLike", default=None)


class CustomerSort(BaseModel):
    direction: SortDirection
    field: CustomerSortFields
    nulls: Optional[SortNulls] = None


class CustomerSubscriptionFilter(BaseModel):
    addons: Optional["CustomerSubscriptionFilterSubscriptionAddonFilter"] = None
    and_: Optional[List["CustomerSubscriptionFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    cancel_reason: Optional["SubscriptionCancelReasonFilterComparison"] = Field(
        alias="cancelReason", default=None
    )
    cancellation_date: Optional["DateFieldComparison"] = Field(
        alias="cancellationDate", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    crm_link_url: Optional["StringFieldComparison"] = Field(
        alias="crmLinkUrl", default=None
    )
    current_billing_period_end: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodEnd", default=None
    )
    current_billing_period_start: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodStart", default=None
    )
    customer: Optional["CustomerSubscriptionFilterCustomerFilter"] = None
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    effective_end_date: Optional["DateFieldComparison"] = Field(
        alias="effectiveEndDate", default=None
    )
    end_date: Optional["DateFieldComparison"] = Field(alias="endDate", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    old_billing_id: Optional["StringFieldComparison"] = Field(
        alias="oldBillingId", default=None
    )
    or_: Optional[List["CustomerSubscriptionFilter"]] = Field(alias="or", default=None)
    payment_collection: Optional["PaymentCollectionFilterComparison"] = Field(
        alias="paymentCollection", default=None
    )
    plan: Optional["CustomerSubscriptionFilterPlanFilter"] = None
    prices: Optional["CustomerSubscriptionFilterSubscriptionPriceFilter"] = None
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    resource: Optional["CustomerSubscriptionFilterCustomerResourceFilter"] = None
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    start_date: Optional["DateFieldComparison"] = Field(alias="startDate", default=None)
    status: Optional["SubscriptionStatusFilterComparison"] = None
    subscription_entitlements: Optional[
        "CustomerSubscriptionFilterSubscriptionEntitlementFilter"
    ] = Field(alias="subscriptionEntitlements", default=None)
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    trial_end_date: Optional["DateFieldComparison"] = Field(
        alias="trialEndDate", default=None
    )


class CustomerSubscriptionFilterCustomerFilter(BaseModel):
    and_: Optional[List["CustomerSubscriptionFilterCustomerFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_hubspot_company_id: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyId", default=None
    )
    crm_hubspot_company_url: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyUrl", default=None
    )
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    deleted_at: Optional["DateFieldComparison"] = Field(alias="deletedAt", default=None)
    email: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["CustomerSubscriptionFilterCustomerFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    search_query: Optional["CustomerSearchQueryFilterComparison"] = Field(
        alias="searchQuery", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CustomerSubscriptionFilterCustomerResourceFilter(BaseModel):
    and_: Optional[List["CustomerSubscriptionFilterCustomerResourceFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    or_: Optional[List["CustomerSubscriptionFilterCustomerResourceFilter"]] = Field(
        alias="or", default=None
    )
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )


class CustomerSubscriptionFilterPlanFilter(BaseModel):
    and_: Optional[List["CustomerSubscriptionFilterPlanFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["CustomerSubscriptionFilterPlanFilter"]] = Field(
        alias="or", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class CustomerSubscriptionFilterSubscriptionAddonFilter(BaseModel):
    and_: Optional[List["CustomerSubscriptionFilterSubscriptionAddonFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["CustomerSubscriptionFilterSubscriptionAddonFilter"]] = Field(
        alias="or", default=None
    )
    quantity: Optional["NumberFieldComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CustomerSubscriptionFilterSubscriptionEntitlementFilter(BaseModel):
    and_: Optional[
        List["CustomerSubscriptionFilterSubscriptionEntitlementFilter"]
    ] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[
        List["CustomerSubscriptionFilterSubscriptionEntitlementFilter"]
    ] = Field(alias="or", default=None)
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class CustomerSubscriptionFilterSubscriptionPriceFilter(BaseModel):
    and_: Optional[List["CustomerSubscriptionFilterSubscriptionPriceFilter"]] = Field(
        alias="and", default=None
    )
    billing_model: Optional["BillingModelFilterComparison"] = Field(
        alias="billingModel", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    feature_id: Optional["StringFieldComparison"] = Field(
        alias="featureId", default=None
    )
    has_soft_limit: Optional["BooleanFieldComparison"] = Field(
        alias="hasSoftLimit", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["CustomerSubscriptionFilterSubscriptionPriceFilter"]] = Field(
        alias="or", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    usage_limit: Optional["NumberFieldComparison"] = Field(
        alias="usageLimit", default=None
    )


class CustomerSubscriptionSort(BaseModel):
    direction: SortDirection
    field: CustomerSubscriptionSortFields
    nulls: Optional[SortNulls] = None


class DateFieldComparison(BaseModel):
    between: Optional["DateFieldComparisonBetween"] = None
    eq: Optional[Any] = None
    gt: Optional[Any] = None
    gte: Optional[Any] = None
    in_: Optional[List[Any]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    lt: Optional[Any] = None
    lte: Optional[Any] = None
    neq: Optional[Any] = None
    not_between: Optional["DateFieldComparisonBetween"] = Field(
        alias="notBetween", default=None
    )
    not_in: Optional[List[Any]] = Field(alias="notIn", default=None)


class DateFieldComparisonBetween(BaseModel):
    lower: Any
    upper: Any


class DefaultTrialConfigInputDTO(BaseModel):
    budget: Optional["BudgetConfigurationInput"] = None
    duration: Optional[float] = None
    units: Optional[TrialPeriodUnits] = None


class DeleteFeatureInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    id: str


class DeleteOneAddonInput(BaseModel):
    id: str


class DeleteOneHookInput(BaseModel):
    id: str


class DeleteOneIntegrationInput(BaseModel):
    id: str


class DeleteOnePackageEntitlementInput(BaseModel):
    id: str


class DeleteOnePriceInput(BaseModel):
    id: str


class DeleteOneProductInput(BaseModel):
    id: str


class DeleteOnePromotionalEntitlementInput(BaseModel):
    id: str


class DetachCustomerPaymentMethodInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class DimensionsMappingInput(BaseModel):
    key: str
    plan_name: str = Field(alias="planName")
    plan_ref_id: str = Field(alias="planRefId")


class DiscardPackageDraftInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    ref_id: str = Field(alias="refId")


class DoesFeatureExist(BaseModel):
    environment_id: str = Field(alias="environmentId")
    ref_id: str = Field(alias="refId")


class DumpEnvironmentForForMergeComparisonInput(BaseModel):
    destination_environment_slug: str = Field(alias="destinationEnvironmentSlug")
    source_environment_slug: str = Field(alias="sourceEnvironmentSlug")


class DumpEnvironmentProductCatalogInput(BaseModel):
    environment_slug: str = Field(alias="environmentSlug")


class DuplicateProductInput(BaseModel):
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    environment_id: str = Field(alias="environmentId")
    ref_id: str = Field(alias="refId")
    source_product_id: str = Field(alias="sourceProductId")


class EditPackageGroupDetailsInput(BaseModel):
    description: Optional[str] = None
    display_name: str = Field(alias="displayName")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    package_group_id: str = Field(alias="packageGroupId")


class EntitlementCheckRequested(BaseModel):
    customer_id: str = Field(alias="customerId")
    entitlement_check_result: "EntitlementCheckResult" = Field(
        alias="entitlementCheckResult"
    )
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_id: str = Field(alias="featureId")
    requested_usage: Optional[float] = Field(alias="requestedUsage", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class EntitlementCheckResult(BaseModel):
    access_denied_reason: Optional[AccessDeniedReason] = Field(
        alias="accessDeniedReason", default=None
    )
    current_usage: Optional[float] = Field(alias="currentUsage", default=None)
    has_access: bool = Field(alias="hasAccess")
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=False)
    has_unlimited_usage: Optional[bool] = Field(
        alias="hasUnlimitedUsage", default=False
    )
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    next_reset_date: Optional[Any] = Field(alias="nextResetDate", default=None)
    requested_usage: Optional[float] = Field(alias="requestedUsage", default=None)
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class EntitlementOptions(BaseModel):
    requested_usage: Optional[float] = Field(alias="requestedUsage", default=None)
    should_track: Optional[bool] = Field(alias="shouldTrack", default=False)


class EnvironmentFilter(BaseModel):
    and_: Optional[List["EnvironmentFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["EnvironmentFilter"]] = Field(alias="or", default=None)
    permanent_deletion_date: Optional["DateFieldComparison"] = Field(
        alias="permanentDeletionDate", default=None
    )
    slug: Optional["StringFieldComparison"] = None


class EnvironmentInput(BaseModel):
    color: Optional[str] = None
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    harden_client_access_enabled: Optional[bool] = Field(
        alias="hardenClientAccessEnabled", default=None
    )
    provision_status: Optional[EnvironmentProvisionStatus] = Field(
        alias="provisionStatus", default=None
    )


class EnvironmentSort(BaseModel):
    direction: SortDirection
    field: EnvironmentSortFields
    nulls: Optional[SortNulls] = None


class EstimateSubscriptionInput(BaseModel):
    addons: Optional[List["SubscriptionAddonInput"]] = None
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    plan_id: str = Field(alias="planId")
    price_unit_amount: Optional[float] = Field(alias="priceUnitAmount", default=None)
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    skip_trial: Optional[bool] = Field(alias="skipTrial", default=False)
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class EstimateSubscriptionUpdateInput(BaseModel):
    addons: Optional[List["SubscriptionAddonInput"]] = None
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    subscription_id: str = Field(alias="subscriptionId")
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=None)


class EventLogCreatedAtFilterComparison(BaseModel):
    gte: Optional[Any] = None
    lte: Optional[Any] = None


class EventLogEntityIdFilterComparison(BaseModel):
    eq: Optional[str] = None
    in_: Optional[List[str]] = Field(alias="in", default=None)


class EventLogEventLogTypeFilterComparison(BaseModel):
    eq: Optional[EventLogType] = None
    in_: Optional[List[EventLogType]] = Field(alias="in", default=None)


class EventLogFilter(BaseModel):
    and_: Optional[List["EventLogFilter"]] = Field(alias="and", default=None)
    created_at: Optional["EventLogCreatedAtFilterComparison"] = Field(
        alias="createdAt", default=None
    )
    entity_id: Optional["EventLogEntityIdFilterComparison"] = Field(
        alias="entityId", default=None
    )
    event_log_type: Optional["EventLogEventLogTypeFilterComparison"] = Field(
        alias="eventLogType", default=None
    )
    or_: Optional[List["EventLogFilter"]] = Field(alias="or", default=None)
    parent_entity_id: Optional["EventLogParentEntityIdFilterComparison"] = Field(
        alias="parentEntityId", default=None
    )


class EventLogParentEntityIdFilterComparison(BaseModel):
    eq: Optional[str] = None
    in_: Optional[List[str]] = Field(alias="in", default=None)


class EventLogSort(BaseModel):
    direction: SortDirection
    field: EventLogSortFields
    nulls: Optional[SortNulls] = None


class EventsFieldsInput(BaseModel):
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    environment_id: str = Field(alias="environmentId")
    filters: Optional[List["MeterFilterDefinitionInput"]] = None
    meter_id: Optional[str] = Field(alias="meterId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    unique_values_limit: Optional[float] = Field(
        alias="uniqueValuesLimit", default=None
    )


class ExperimentFilter(BaseModel):
    and_: Optional[List["ExperimentFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    customers: Optional["ExperimentFilterCustomerFilter"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["ExperimentFilter"]] = Field(alias="or", default=None)
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["ExperimentStatusFilterComparison"] = None


class ExperimentFilterCustomerFilter(BaseModel):
    and_: Optional[List["ExperimentFilterCustomerFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_hubspot_company_id: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyId", default=None
    )
    crm_hubspot_company_url: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyUrl", default=None
    )
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    deleted_at: Optional["DateFieldComparison"] = Field(alias="deletedAt", default=None)
    email: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["ExperimentFilterCustomerFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    search_query: Optional["CustomerSearchQueryFilterComparison"] = Field(
        alias="searchQuery", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class ExperimentSort(BaseModel):
    direction: SortDirection
    field: ExperimentSortFields
    nulls: Optional[SortNulls] = None


class ExperimentStatsQuery(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    experiment_ref_id: str = Field(alias="experimentRefId")


class ExperimentStatusFilterComparison(BaseModel):
    eq: Optional[ExperimentStatus] = None
    gt: Optional[ExperimentStatus] = None
    gte: Optional[ExperimentStatus] = None
    i_like: Optional[ExperimentStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[ExperimentStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[ExperimentStatus] = None
    lt: Optional[ExperimentStatus] = None
    lte: Optional[ExperimentStatus] = None
    neq: Optional[ExperimentStatus] = None
    not_i_like: Optional[ExperimentStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[ExperimentStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[ExperimentStatus] = Field(alias="notLike", default=None)


class FeatureAssociatedLatestPackages(BaseModel):
    environment_id: str = Field(alias="environmentId")
    feature_id: str = Field(alias="featureId")


class FeatureFilter(BaseModel):
    and_: Optional[List["FeatureFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature_status: Optional["FeatureStatusFilterComparison"] = Field(
        alias="featureStatus", default=None
    )
    feature_type: Optional["FeatureTypeFilterComparison"] = Field(
        alias="featureType", default=None
    )
    id: Optional["StringFieldComparison"] = None
    meter_type: Optional["MeterTypeFilterComparison"] = Field(
        alias="meterType", default=None
    )
    or_: Optional[List["FeatureFilter"]] = Field(alias="or", default=None)
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class FeatureInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    description: Optional[str] = None
    display_name: str = Field(alias="displayName")
    environment_id: str = Field(alias="environmentId")
    feature_status: Optional[FeatureStatus] = Field(alias="featureStatus", default=None)
    feature_type: FeatureType = Field(alias="featureType")
    feature_units: Optional[str] = Field(alias="featureUnits", default=None)
    feature_units_plural: Optional[str] = Field(
        alias="featureUnitsPlural", default=None
    )
    meter: Optional["CreateMeter"] = None
    meter_type: Optional[MeterType] = Field(alias="meterType", default=None)
    ref_id: str = Field(alias="refId")


class FeatureSort(BaseModel):
    direction: SortDirection
    field: FeatureSortFields
    nulls: Optional[SortNulls] = None


class FeatureStatusFilterComparison(BaseModel):
    eq: Optional[FeatureStatus] = None
    gt: Optional[FeatureStatus] = None
    gte: Optional[FeatureStatus] = None
    i_like: Optional[FeatureStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[FeatureStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[FeatureStatus] = None
    lt: Optional[FeatureStatus] = None
    lte: Optional[FeatureStatus] = None
    neq: Optional[FeatureStatus] = None
    not_i_like: Optional[FeatureStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[FeatureStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[FeatureStatus] = Field(alias="notLike", default=None)


class FeatureTypeFilterComparison(BaseModel):
    eq: Optional[FeatureType] = None
    gt: Optional[FeatureType] = None
    gte: Optional[FeatureType] = None
    i_like: Optional[FeatureType] = Field(alias="iLike", default=None)
    in_: Optional[List[FeatureType]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[FeatureType] = None
    lt: Optional[FeatureType] = None
    lte: Optional[FeatureType] = None
    neq: Optional[FeatureType] = None
    not_i_like: Optional[FeatureType] = Field(alias="notILike", default=None)
    not_in: Optional[List[FeatureType]] = Field(alias="notIn", default=None)
    not_like: Optional[FeatureType] = Field(alias="notLike", default=None)


class FetchEntitlementQuery(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_id: str = Field(alias="featureId")
    options: Optional["EntitlementOptions"] = None
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class FetchEntitlementsQuery(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class FontVariantInput(BaseModel):
    font_size: Optional[float] = Field(alias="fontSize", default=None)
    font_weight: Optional[FontWeight] = Field(alias="fontWeight", default=None)


class GetActiveSubscriptionsInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    resource_ids: Optional[List[str]] = Field(alias="resourceIds", default=None)


class GetCustomerByRefIdInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class GetPackageByRefIdInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    ref_id: str = Field(alias="refId")
    version_number: Optional[float] = Field(alias="versionNumber", default=None)


class GetPackageGroup(BaseModel):
    environment_id: str = Field(alias="environmentId")
    package_group_id: str = Field(alias="packageGroupId")
    version_number: Optional[float] = Field(alias="versionNumber", default=None)


class GetPaywallInput(BaseModel):
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    context: Optional[WidgetType] = None
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    fetch_all_countries_prices: Optional[bool] = Field(
        alias="fetchAllCountriesPrices", default=False
    )
    include_hidden_plans: Optional[bool] = Field(
        alias="includeHiddenPlans", default=False
    )
    product_id: Optional[str] = Field(alias="productId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class GetWidgetConfigurationInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class GrantPromotionalEntitlementInput(BaseModel):
    custom_end_date: Optional[Any] = Field(alias="customEndDate", default=None)
    feature_id: str = Field(alias="featureId")
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    is_visible: Optional[bool] = Field(alias="isVisible", default=None)
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    period: PromotionalEntitlementPeriod
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class GrantPromotionalEntitlementsInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    promotional_entitlements: List["GrantPromotionalEntitlementInput"] = Field(
        alias="promotionalEntitlements"
    )


class HookFilter(BaseModel):
    and_: Optional[List["HookFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    endpoint: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["HookFilter"]] = Field(alias="or", default=None)
    status: Optional["HookStatusFilterComparison"] = None


class HookSort(BaseModel):
    direction: SortDirection
    field: HookSortFields
    nulls: Optional[SortNulls] = None


class HookStatusFilterComparison(BaseModel):
    eq: Optional[HookStatus] = None
    gt: Optional[HookStatus] = None
    gte: Optional[HookStatus] = None
    i_like: Optional[HookStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[HookStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[HookStatus] = None
    lt: Optional[HookStatus] = None
    lte: Optional[HookStatus] = None
    neq: Optional[HookStatus] = None
    not_i_like: Optional[HookStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[HookStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[HookStatus] = Field(alias="notLike", default=None)


class HubspotCredentialsInput(BaseModel):
    authorization_code: str = Field(alias="authorizationCode")
    refresh_token: Optional[str] = Field(alias="refreshToken", default=None)


class ImportCustomerBulk(BaseModel):
    customers: List["ImportCustomerInput"]
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class ImportCustomerInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    email: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: Optional[str] = None
    payment_method_id: Optional[str] = Field(alias="paymentMethodId", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    updated_at: Optional[Any] = Field(alias="updatedAt", default=None)


class ImportIntegrationCatalogInput(BaseModel):
    billing_model: Optional[BillingModel] = Field(alias="billingModel", default=None)
    entity_selection_mode: EntitySelectionMode = Field(alias="entitySelectionMode")
    environment_id: str = Field(alias="environmentId")
    feature_unit_name: Optional[str] = Field(alias="featureUnitName", default=None)
    feature_unit_plural_name: Optional[str] = Field(
        alias="featureUnitPluralName", default=None
    )
    plans_selection_blacklist: Optional[List[str]] = Field(
        alias="plansSelectionBlacklist", default=None
    )
    plans_selection_whitelist: Optional[List[str]] = Field(
        alias="plansSelectionWhitelist", default=None
    )
    product_id: str = Field(alias="productId")
    selected_addon_billing_ids: List[str] = Field(alias="selectedAddonBillingIds")
    vendor_identifier: VendorIdentifier = Field(alias="vendorIdentifier")


class ImportIntegrationCustomersInput(BaseModel):
    customers_selection_blacklist: Optional[List[str]] = Field(
        alias="customersSelectionBlacklist", default=None
    )
    customers_selection_whitelist: Optional[List[str]] = Field(
        alias="customersSelectionWhitelist", default=None
    )
    entity_selection_mode: EntitySelectionMode = Field(alias="entitySelectionMode")
    environment_id: str = Field(alias="environmentId")
    product_id: str = Field(alias="productId")
    vendor_identifier: VendorIdentifier = Field(alias="vendorIdentifier")


class ImportIntegrationTaskFilter(BaseModel):
    and_: Optional[List["ImportIntegrationTaskFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["ImportIntegrationTaskFilter"]] = Field(alias="or", default=None)
    status: Optional["TaskStatusFilterComparison"] = None
    task_type: Optional["TaskTypeFilterComparison"] = Field(
        alias="taskType", default=None
    )


class ImportIntegrationTaskSort(BaseModel):
    direction: SortDirection
    field: ImportIntegrationTaskSortFields
    nulls: Optional[SortNulls] = None


class ImportSubscriptionInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    customer_id: str = Field(alias="customerId")
    plan_id: str = Field(alias="planId")
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=None)
    updated_at: Optional[Any] = Field(alias="updatedAt", default=None)


class ImportSubscriptionsBulk(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    subscriptions: List["ImportSubscriptionInput"]


class InitAddStripeCustomerPaymentMethodInput(BaseModel):
    customer_ref_id: str = Field(alias="customerRefId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class IntFieldComparison(BaseModel):
    between: Optional["IntFieldComparisonBetween"] = None
    eq: Optional[int] = None
    gt: Optional[int] = None
    gte: Optional[int] = None
    in_: Optional[List[int]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    lt: Optional[int] = None
    lte: Optional[int] = None
    neq: Optional[int] = None
    not_between: Optional["IntFieldComparisonBetween"] = Field(
        alias="notBetween", default=None
    )
    not_in: Optional[List[int]] = Field(alias="notIn", default=None)


class IntFieldComparisonBetween(BaseModel):
    lower: int
    upper: int


class IntegrationFilter(BaseModel):
    and_: Optional[List["IntegrationFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["IntegrationFilter"]] = Field(alias="or", default=None)
    vendor_identifier: Optional["VendorIdentifierFilterComparison"] = Field(
        alias="vendorIdentifier", default=None
    )


class IntegrationSort(BaseModel):
    direction: SortDirection
    field: IntegrationSortFields
    nulls: Optional[SortNulls] = None


class ListAwsProductDimensionsInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    product_id: str = Field(alias="productId")


class ListAwsProductsInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class MarkInvoiceAsPaidInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    subscription_id: str = Field(alias="subscriptionId")


class MemberFilter(BaseModel):
    and_: Optional[List["MemberFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["MemberFilter"]] = Field(alias="or", default=None)


class MemberSort(BaseModel):
    direction: SortDirection
    field: MemberSortFields
    nulls: Optional[SortNulls] = None


class MergeEnvironmentInput(BaseModel):
    destination_environment_name: Optional[str] = Field(
        alias="destinationEnvironmentName", default=None
    )
    destination_environment_slug: Optional[str] = Field(
        alias="destinationEnvironmentSlug", default=None
    )
    destination_environment_type: Optional[EnvironmentType] = Field(
        alias="destinationEnvironmentType", default=None
    )
    migration_type: Optional[PublishMigrationType] = Field(
        alias="migrationType", default=None
    )
    source_environment_slug: Optional[str] = Field(
        alias="sourceEnvironmentSlug", default=None
    )
    source_template: Optional[Any] = Field(alias="sourceTemplate", default=None)


class MeterAggregation(BaseModel):
    field: Optional[str] = None
    function: AggregationFunction


class MeterConditionInput(BaseModel):
    field: str
    operation: ConditionOperation
    value: Optional[str] = None


class MeterFilterDefinitionInput(BaseModel):
    conditions: List["MeterConditionInput"]


class MeterTypeFilterComparison(BaseModel):
    eq: Optional[MeterType] = None
    gt: Optional[MeterType] = None
    gte: Optional[MeterType] = None
    i_like: Optional[MeterType] = Field(alias="iLike", default=None)
    in_: Optional[List[MeterType]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[MeterType] = None
    lt: Optional[MeterType] = None
    lte: Optional[MeterType] = None
    neq: Optional[MeterType] = None
    not_i_like: Optional[MeterType] = Field(alias="notILike", default=None)
    not_in: Optional[List[MeterType]] = Field(alias="notIn", default=None)
    not_like: Optional[MeterType] = Field(alias="notLike", default=None)


class MinimumSpendInput(BaseModel):
    billing_period: BillingPeriod = Field(alias="billingPeriod")
    minimum: "MoneyInputDTO"


class MoneyInputDTO(BaseModel):
    amount: float
    currency: Optional[Currency] = None


class MonthlyResetPeriodConfigInput(BaseModel):
    according_to: MonthlyAccordingTo = Field(alias="accordingTo")


class NumberFieldComparison(BaseModel):
    between: Optional["NumberFieldComparisonBetween"] = None
    eq: Optional[float] = None
    gt: Optional[float] = None
    gte: Optional[float] = None
    in_: Optional[List[float]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    lt: Optional[float] = None
    lte: Optional[float] = None
    neq: Optional[float] = None
    not_between: Optional["NumberFieldComparisonBetween"] = Field(
        alias="notBetween", default=None
    )
    not_in: Optional[List[float]] = Field(alias="notIn", default=None)


class NumberFieldComparisonBetween(BaseModel):
    lower: float
    upper: float


class OverageEntitlementCreateInput(BaseModel):
    behavior: Optional[EntitlementBehavior] = EntitlementBehavior.Increment
    description: Optional[str] = None
    display_name_override: Optional[str] = Field(
        alias="displayNameOverride", default=None
    )
    feature_id: str = Field(alias="featureId")
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    is_custom: Optional[bool] = Field(alias="isCustom", default=None)
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    order: Optional[float] = None
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class OveragePricingModelCreateInput(BaseModel):
    billing_cadence: Optional[BillingCadence] = Field(
        alias="billingCadence", default=BillingCadence.RECURRING
    )
    billing_model: BillingModel = Field(alias="billingModel")
    entitlement: Optional["OverageEntitlementCreateInput"] = None
    feature_id: Optional[str] = Field(alias="featureId", default=None)
    price_periods: List["PricePeriodInput"] = Field(alias="pricePeriods")


class PackageDTOFilter(BaseModel):
    and_: Optional[List["PackageDTOFilter"]] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["PackageDTOFilter"]] = Field(alias="or", default=None)
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class PackageDTOSort(BaseModel):
    direction: SortDirection
    field: PackageDTOSortFields
    nulls: Optional[SortNulls] = None


class PackageEntitlementFilter(BaseModel):
    and_: Optional[List["PackageEntitlementFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature: Optional["PackageEntitlementFilterFeatureFilter"] = None
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["PackageEntitlementFilter"]] = Field(alias="or", default=None)
    package: Optional["PackageEntitlementFilterPackageDTOFilter"] = None
    package_id: Optional["StringFieldComparison"] = Field(
        alias="packageId", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class PackageEntitlementFilterFeatureFilter(BaseModel):
    and_: Optional[List["PackageEntitlementFilterFeatureFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature_status: Optional["FeatureStatusFilterComparison"] = Field(
        alias="featureStatus", default=None
    )
    feature_type: Optional["FeatureTypeFilterComparison"] = Field(
        alias="featureType", default=None
    )
    id: Optional["StringFieldComparison"] = None
    meter_type: Optional["MeterTypeFilterComparison"] = Field(
        alias="meterType", default=None
    )
    or_: Optional[List["PackageEntitlementFilterFeatureFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class PackageEntitlementFilterPackageDTOFilter(BaseModel):
    and_: Optional[List["PackageEntitlementFilterPackageDTOFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["PackageEntitlementFilterPackageDTOFilter"]] = Field(
        alias="or", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class PackageEntitlementInput(BaseModel):
    behavior: Optional[EntitlementBehavior] = EntitlementBehavior.Increment
    description: Optional[str] = None
    display_name_override: Optional[str] = Field(
        alias="displayNameOverride", default=None
    )
    environment_id: str = Field(alias="environmentId")
    feature_id: str = Field(alias="featureId")
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    is_custom: Optional[bool] = Field(alias="isCustom", default=None)
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    order: Optional[float] = None
    package_id: str = Field(alias="packageId")
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class PackageEntitlementSort(BaseModel):
    direction: SortDirection
    field: PackageEntitlementSortFields
    nulls: Optional[SortNulls] = None


class PackageEntitlementUpdateInput(BaseModel):
    behavior: Optional[EntitlementBehavior] = None
    description: Optional[str] = None
    display_name_override: Optional[str] = Field(
        alias="displayNameOverride", default=None
    )
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    is_custom: Optional[bool] = Field(alias="isCustom", default=None)
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    order: Optional[float] = None
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class PackageGroupFilter(BaseModel):
    and_: Optional[List["PackageGroupFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["PackageGroupFilter"]] = Field(alias="or", default=None)
    package_group_id: Optional["StringFieldComparison"] = Field(
        alias="packageGroupId", default=None
    )
    product: Optional["PackageGroupFilterProductFilter"] = None
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    status: Optional["PackageGroupStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class PackageGroupFilterProductFilter(BaseModel):
    and_: Optional[List["PackageGroupFilterProductFilter"]] = Field(
        alias="and", default=None
    )
    aws_marketplace_product_code: Optional["StringFieldComparison"] = Field(
        alias="awsMarketplaceProductCode", default=None
    )
    aws_marketplace_product_id: Optional["StringFieldComparison"] = Field(
        alias="awsMarketplaceProductId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_default_product: Optional["BooleanFieldComparison"] = Field(
        alias="isDefaultProduct", default=None
    )
    or_: Optional[List["PackageGroupFilterProductFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class PackageGroupSort(BaseModel):
    direction: SortDirection
    field: PackageGroupSortFields
    nulls: Optional[SortNulls] = None


class PackageGroupStatusFilterComparison(BaseModel):
    eq: Optional[PackageGroupStatus] = None
    gt: Optional[PackageGroupStatus] = None
    gte: Optional[PackageGroupStatus] = None
    i_like: Optional[PackageGroupStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[PackageGroupStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[PackageGroupStatus] = None
    lt: Optional[PackageGroupStatus] = None
    lte: Optional[PackageGroupStatus] = None
    neq: Optional[PackageGroupStatus] = None
    not_i_like: Optional[PackageGroupStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[PackageGroupStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[PackageGroupStatus] = Field(alias="notLike", default=None)


class PackagePricingInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    minimum_spend: Optional[List["MinimumSpendInput"]] = Field(
        alias="minimumSpend", default=None
    )
    overage_billing_period: Optional[OverageBillingPeriod] = Field(
        alias="overageBillingPeriod", default=None
    )
    overage_pricing_models: Optional[List["OveragePricingModelCreateInput"]] = Field(
        alias="overagePricingModels", default=None
    )
    package_id: str = Field(alias="packageId")
    pricing_model: Optional["PricingModelCreateInput"] = Field(
        alias="pricingModel", default=None
    )
    pricing_models: Optional[List["PricingModelCreateInput"]] = Field(
        alias="pricingModels", default=None
    )
    pricing_type: PricingType = Field(alias="pricingType")


class PackagePublishInput(BaseModel):
    id: str
    migration_type: PublishMigrationType = Field(alias="migrationType")


class PackageStatusFilterComparison(BaseModel):
    eq: Optional[PackageStatus] = None
    gt: Optional[PackageStatus] = None
    gte: Optional[PackageStatus] = None
    i_like: Optional[PackageStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[PackageStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[PackageStatus] = None
    lt: Optional[PackageStatus] = None
    lte: Optional[PackageStatus] = None
    neq: Optional[PackageStatus] = None
    not_i_like: Optional[PackageStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[PackageStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[PackageStatus] = Field(alias="notLike", default=None)


class PaymentCollectionFilterComparison(BaseModel):
    eq: Optional[PaymentCollection] = None
    gt: Optional[PaymentCollection] = None
    gte: Optional[PaymentCollection] = None
    i_like: Optional[PaymentCollection] = Field(alias="iLike", default=None)
    in_: Optional[List[PaymentCollection]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[PaymentCollection] = None
    lt: Optional[PaymentCollection] = None
    lte: Optional[PaymentCollection] = None
    neq: Optional[PaymentCollection] = None
    not_i_like: Optional[PaymentCollection] = Field(alias="notILike", default=None)
    not_in: Optional[List[PaymentCollection]] = Field(alias="notIn", default=None)
    not_like: Optional[PaymentCollection] = Field(alias="notLike", default=None)


class PaywallColorsPaletteInput(BaseModel):
    background_color: Optional[str] = Field(alias="backgroundColor", default=None)
    border_color: Optional[str] = Field(alias="borderColor", default=None)
    current_plan_background: Optional[str] = Field(
        alias="currentPlanBackground", default=None
    )
    primary: Optional[str] = None
    text_color: Optional[str] = Field(alias="textColor", default=None)


class PaywallConfigurationInput(BaseModel):
    custom_css: Optional[str] = Field(alias="customCss", default=None)
    layout: Optional["PaywallLayoutConfigurationInput"] = None
    palette: Optional["PaywallColorsPaletteInput"] = None
    typography: Optional["TypographyConfigurationInput"] = None


class PaywallLayoutConfigurationInput(BaseModel):
    alignment: Optional[Alignment] = None
    plan_margin: Optional[float] = Field(alias="planMargin", default=None)
    plan_padding: Optional[float] = Field(alias="planPadding", default=None)
    plan_width: Optional[float] = Field(alias="planWidth", default=None)


class PlanCreateInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    aws_marketplace_plan_dimension: Optional[str] = Field(
        alias="awsMarketplacePlanDimension", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    description: Optional[str] = None
    display_name: str = Field(alias="displayName")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    parent_plan_id: Optional[str] = Field(alias="parentPlanId", default=None)
    pricing_type: Optional[PricingType] = Field(alias="pricingType", default=None)
    product_id: str = Field(alias="productId")
    ref_id: Optional[str] = Field(alias="refId", default=None)
    status: Optional[PackageStatus] = None


class PlanFilter(BaseModel):
    and_: Optional[List["PlanFilter"]] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    compatible_addons: Optional["PlanFilterAddonFilter"] = Field(
        alias="compatibleAddons", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["PlanFilter"]] = Field(alias="or", default=None)
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product: Optional["PlanFilterProductFilter"] = None
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class PlanFilterAddonFilter(BaseModel):
    and_: Optional[List["PlanFilterAddonFilter"]] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["PlanFilterAddonFilter"]] = Field(alias="or", default=None)
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class PlanFilterProductFilter(BaseModel):
    and_: Optional[List["PlanFilterProductFilter"]] = Field(alias="and", default=None)
    aws_marketplace_product_code: Optional["StringFieldComparison"] = Field(
        alias="awsMarketplaceProductCode", default=None
    )
    aws_marketplace_product_id: Optional["StringFieldComparison"] = Field(
        alias="awsMarketplaceProductId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_default_product: Optional["BooleanFieldComparison"] = Field(
        alias="isDefaultProduct", default=None
    )
    or_: Optional[List["PlanFilterProductFilter"]] = Field(alias="or", default=None)
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class PlanSort(BaseModel):
    direction: SortDirection
    field: PlanSortFields
    nulls: Optional[SortNulls] = None


class PlanUpdateInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    default_trial_config: Optional["DefaultTrialConfigInputDTO"] = Field(
        alias="defaultTrialConfig", default=None
    )
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    hidden_from_widgets: Optional[List[WidgetType]] = Field(
        alias="hiddenFromWidgets", default=None
    )
    id: str
    minimum_spend: Optional[List["MinimumSpendInput"]] = Field(
        alias="minimumSpend", default=None
    )
    parent_plan_id: Optional[str] = Field(alias="parentPlanId", default=None)
    status: Optional[PackageStatus] = None


class PreviewNextInvoiceInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    subscription_id: str = Field(alias="subscriptionId")


class PreviewSubscriptionInput(BaseModel):
    addons: Optional[List["SubscriptionAddonInput"]] = None
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    plan_id: str = Field(alias="planId")
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    schedule_strategy: Optional[ScheduleStrategy] = Field(
        alias="scheduleStrategy", default=None
    )
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class PriceFilter(BaseModel):
    and_: Optional[List["PriceFilter"]] = Field(alias="and", default=None)
    billing_cadence: Optional["BillingCadenceFilterComparison"] = Field(
        alias="billingCadence", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    billing_model: Optional["BillingModelFilterComparison"] = Field(
        alias="billingModel", default=None
    )
    billing_period: Optional["BillingPeriodFilterComparison"] = Field(
        alias="billingPeriod", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["PriceFilter"]] = Field(alias="or", default=None)
    package: Optional["PriceFilterPackageDTOFilter"] = None
    tiers_mode: Optional["TiersModeFilterComparison"] = Field(
        alias="tiersMode", default=None
    )


class PriceFilterPackageDTOFilter(BaseModel):
    and_: Optional[List["PriceFilterPackageDTOFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["PriceFilterPackageDTOFilter"]] = Field(alias="or", default=None)
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class PriceOverrideInput(BaseModel):
    base_charge: Optional[bool] = Field(alias="baseCharge", default=None)
    block_size: Optional[float] = Field(alias="blockSize", default=None)
    feature_id: Optional[str] = Field(alias="featureId", default=None)
    price: Optional["MoneyInputDTO"] = None
    tiers: Optional[List["PriceTierInput"]] = None


class PricePeriodInput(BaseModel):
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_period: BillingPeriod = Field(alias="billingPeriod")
    block_size: Optional[float] = Field(alias="blockSize", default=None)
    price: Optional["MoneyInputDTO"] = None
    tiers: Optional[List["PriceTierInput"]] = None


class PriceSort(BaseModel):
    direction: SortDirection
    field: PriceSortFields
    nulls: Optional[SortNulls] = None


class PriceTierInput(BaseModel):
    flat_price: Optional["MoneyInputDTO"] = Field(alias="flatPrice", default=None)
    unit_price: Optional["MoneyInputDTO"] = Field(alias="unitPrice", default=None)
    up_to: Optional[float] = Field(alias="upTo", default=None)


class PricingModelCreateInput(BaseModel):
    billing_cadence: Optional[BillingCadence] = Field(
        alias="billingCadence", default=BillingCadence.RECURRING
    )
    billing_model: BillingModel = Field(alias="billingModel")
    feature_id: Optional[str] = Field(alias="featureId", default=None)
    max_unit_quantity: Optional[float] = Field(alias="maxUnitQuantity", default=None)
    min_unit_quantity: Optional[float] = Field(alias="minUnitQuantity", default=None)
    price_periods: List["PricePeriodInput"] = Field(alias="pricePeriods")
    tiers_mode: Optional[TiersMode] = Field(alias="tiersMode", default=None)


class PricingTypeFilterComparison(BaseModel):
    eq: Optional[PricingType] = None
    gt: Optional[PricingType] = None
    gte: Optional[PricingType] = None
    i_like: Optional[PricingType] = Field(alias="iLike", default=None)
    in_: Optional[List[PricingType]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[PricingType] = None
    lt: Optional[PricingType] = None
    lte: Optional[PricingType] = None
    neq: Optional[PricingType] = None
    not_i_like: Optional[PricingType] = Field(alias="notILike", default=None)
    not_in: Optional[List[PricingType]] = Field(alias="notIn", default=None)
    not_like: Optional[PricingType] = Field(alias="notLike", default=None)


class ProductCreateInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    environment_id: str = Field(alias="environmentId")
    multiple_subscriptions: Optional[bool] = Field(
        alias="multipleSubscriptions", default=False
    )
    ref_id: str = Field(alias="refId")


class ProductFilter(BaseModel):
    and_: Optional[List["ProductFilter"]] = Field(alias="and", default=None)
    aws_marketplace_product_code: Optional["StringFieldComparison"] = Field(
        alias="awsMarketplaceProductCode", default=None
    )
    aws_marketplace_product_id: Optional["StringFieldComparison"] = Field(
        alias="awsMarketplaceProductId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_default_product: Optional["BooleanFieldComparison"] = Field(
        alias="isDefaultProduct", default=None
    )
    or_: Optional[List["ProductFilter"]] = Field(alias="or", default=None)
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class ProductSettingsInput(BaseModel):
    downgrade_at_end_of_billing_period: Optional[str] = Field(
        alias="downgradeAtEndOfBillingPeriod", default=None
    )
    downgrade_plan_id: Optional[str] = Field(alias="downgradePlanId", default=None)
    prorate_at_end_of_billing_period: Optional[bool] = Field(
        alias="prorateAtEndOfBillingPeriod", default=None
    )
    subscription_cancellation_time: SubscriptionCancellationTime = Field(
        alias="subscriptionCancellationTime"
    )
    subscription_end_setup: SubscriptionEndSetup = Field(alias="subscriptionEndSetup")
    subscription_start_plan_id: Optional[str] = Field(
        alias="subscriptionStartPlanId", default=None
    )
    subscription_start_setup: SubscriptionStartSetup = Field(
        alias="subscriptionStartSetup"
    )


class ProductSort(BaseModel):
    direction: SortDirection
    field: ProductSortFields
    nulls: Optional[SortNulls] = None


class ProductUpdateInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    multiple_subscriptions: Optional[bool] = Field(
        alias="multipleSubscriptions", default=None
    )
    product_settings: Optional["ProductSettingsInput"] = Field(
        alias="productSettings", default=None
    )


class PromotionalEntitlementFilter(BaseModel):
    and_: Optional[List["PromotionalEntitlementFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["PromotionalEntitlementFilter"]] = Field(
        alias="or", default=None
    )
    status: Optional["PromotionalEntitlementStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class PromotionalEntitlementInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    description: Optional[str] = None
    end_date: Optional[Any] = Field(alias="endDate", default=None)
    environment_id: str = Field(alias="environmentId")
    feature_id: str = Field(alias="featureId")
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    is_visible: bool = Field(alias="isVisible")
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    period: PromotionalEntitlementPeriod
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class PromotionalEntitlementSort(BaseModel):
    direction: SortDirection
    field: PromotionalEntitlementSortFields
    nulls: Optional[SortNulls] = None


class PromotionalEntitlementStatusFilterComparison(BaseModel):
    eq: Optional[PromotionalEntitlementStatus] = None
    gt: Optional[PromotionalEntitlementStatus] = None
    gte: Optional[PromotionalEntitlementStatus] = None
    i_like: Optional[PromotionalEntitlementStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[PromotionalEntitlementStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[PromotionalEntitlementStatus] = None
    lt: Optional[PromotionalEntitlementStatus] = None
    lte: Optional[PromotionalEntitlementStatus] = None
    neq: Optional[PromotionalEntitlementStatus] = None
    not_i_like: Optional[PromotionalEntitlementStatus] = Field(
        alias="notILike", default=None
    )
    not_in: Optional[List[PromotionalEntitlementStatus]] = Field(
        alias="notIn", default=None
    )
    not_like: Optional[PromotionalEntitlementStatus] = Field(
        alias="notLike", default=None
    )


class PromotionalEntitlementUpdateInput(BaseModel):
    description: Optional[str] = None
    end_date: Optional[Any] = Field(alias="endDate", default=None)
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    is_visible: bool = Field(alias="isVisible")
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    period: PromotionalEntitlementPeriod
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )


class ProvisionCustomerInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    aws_marketplace_customer_id: Optional[str] = Field(
        alias="awsMarketplaceCustomerId", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["CustomerBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    coupon_ref_id: Optional[str] = Field(alias="couponRefId", default=None)
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    crm_id: Optional[str] = Field(alias="crmId", default=None)
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    email: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    exclude_from_experiment: Optional[bool] = Field(
        alias="excludeFromExperiment", default=False
    )
    name: Optional[str] = None
    ref_id: Optional[str] = Field(alias="refId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    should_sync_free: Optional[bool] = Field(alias="shouldSyncFree", default=False)
    subscription_params: Optional["ProvisionCustomerSubscriptionInput"] = Field(
        alias="subscriptionParams", default=None
    )


class ProvisionCustomerSubscriptionInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    addons: Optional[List["SubscriptionAddonInput"]] = None
    await_payment_confirmation: Optional[bool] = Field(
        alias="awaitPaymentConfirmation", default=True
    )
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    budget: Optional["BudgetConfigurationInput"] = None
    minimum_spend: Optional["SubscriptionMinimumSpendValueInput"] = Field(
        alias="minimumSpend", default=None
    )
    payment_collection_method: Optional[PaymentCollectionMethod] = Field(
        alias="paymentCollectionMethod", default=PaymentCollectionMethod.CHARGE
    )
    plan_id: str = Field(alias="planId")
    price_overrides: Optional[List["PriceOverrideInput"]] = Field(
        alias="priceOverrides", default=None
    )
    price_unit_amount: Optional[float] = Field(alias="priceUnitAmount", default=None)
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    subscription_entitlements: Optional[List["SubscriptionEntitlementInput"]] = Field(
        alias="subscriptionEntitlements", default=None
    )
    subscription_id: Optional[str] = Field(alias="subscriptionId", default=None)
    trial_override_configuration: Optional["TrialOverrideConfigurationInput"] = Field(
        alias="trialOverrideConfiguration", default=None
    )
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class ProvisionSandboxInput(BaseModel):
    billing_model: BillingModel = Field(alias="billingModel")
    display_name: str = Field(alias="displayName")


class ProvisionSubscription(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    addons: Optional[List["SubscriptionAddonInput"]] = None
    await_payment_confirmation: Optional[bool] = Field(
        alias="awaitPaymentConfirmation", default=True
    )
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    budget: Optional["BudgetConfigurationInput"] = None
    checkout_options: Optional["CheckoutOptions"] = Field(
        alias="checkoutOptions", default=None
    )
    customer_id: str = Field(alias="customerId")
    minimum_spend: Optional["SubscriptionMinimumSpendValueInput"] = Field(
        alias="minimumSpend", default=None
    )
    payment_collection_method: Optional[PaymentCollectionMethod] = Field(
        alias="paymentCollectionMethod", default=PaymentCollectionMethod.CHARGE
    )
    plan_id: str = Field(alias="planId")
    price_overrides: Optional[List["PriceOverrideInput"]] = Field(
        alias="priceOverrides", default=None
    )
    price_unit_amount: Optional[float] = Field(alias="priceUnitAmount", default=None)
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    schedule_strategy: Optional[ScheduleStrategy] = Field(
        alias="scheduleStrategy", default=None
    )
    skip_trial: Optional[bool] = Field(alias="skipTrial", default=False)
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    subscription_entitlements: Optional[List["SubscriptionEntitlementInput"]] = Field(
        alias="subscriptionEntitlements", default=None
    )
    subscription_id: Optional[str] = Field(alias="subscriptionId", default=None)
    trial_override_configuration: Optional["TrialOverrideConfigurationInput"] = Field(
        alias="trialOverrideConfiguration", default=None
    )
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class ProvisionSubscriptionInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    addons: Optional[List["SubscriptionAddonInput"]] = None
    await_payment_confirmation: Optional[bool] = Field(
        alias="awaitPaymentConfirmation", default=True
    )
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    budget: Optional["BudgetConfigurationInput"] = None
    checkout_options: Optional["CheckoutOptions"] = Field(
        alias="checkoutOptions", default=None
    )
    customer_id: str = Field(alias="customerId")
    minimum_spend: Optional["SubscriptionMinimumSpendValueInput"] = Field(
        alias="minimumSpend", default=None
    )
    payment_collection_method: Optional[PaymentCollectionMethod] = Field(
        alias="paymentCollectionMethod", default=PaymentCollectionMethod.CHARGE
    )
    plan_id: str = Field(alias="planId")
    price_overrides: Optional[List["PriceOverrideInput"]] = Field(
        alias="priceOverrides", default=None
    )
    price_unit_amount: Optional[float] = Field(alias="priceUnitAmount", default=None)
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    schedule_strategy: Optional[ScheduleStrategy] = Field(
        alias="scheduleStrategy", default=None
    )
    skip_trial: Optional[bool] = Field(alias="skipTrial", default=False)
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    subscription_entitlements: Optional[List["SubscriptionEntitlementInput"]] = Field(
        alias="subscriptionEntitlements", default=None
    )
    subscription_id: Optional[str] = Field(alias="subscriptionId", default=None)
    trial_override_configuration: Optional["TrialOverrideConfigurationInput"] = Field(
        alias="trialOverrideConfiguration", default=None
    )
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class RecalculateEntitlementsInput(BaseModel):
    customer_ids: Optional[List[str]] = Field(alias="customerIds", default=None)
    environment_id: str = Field(alias="environmentId")
    for_all_customers: Optional[bool] = Field(alias="forAllCustomers", default=False)
    side_effects_options: Optional[
        "RecalculateEntitlementsSideEffectsOptionsInput"
    ] = Field(alias="sideEffectsOptions", default=None)


class RecalculateEntitlementsSideEffectsOptionsInput(BaseModel):
    skip_publish_to_subscribers: Optional[bool] = Field(
        alias="skipPublishToSubscribers", default=False
    )
    skip_write_to_cache: Optional[bool] = Field(alias="skipWriteToCache", default=False)
    skip_write_to_data_catalog: Optional[bool] = Field(
        alias="skipWriteToDataCatalog", default=False
    )
    skip_write_to_event_log: Optional[bool] = Field(
        alias="skipWriteToEventLog", default=False
    )


class RemoveBasePlanFromPlanInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class RemoveCompatibleAddonsFromPlanInput(BaseModel):
    id: str
    relation_ids: List[str] = Field(alias="relationIds")


class RemoveCouponFromCustomerInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class RemoveCouponFromCustomerSubscriptionInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class RemoveExperimentFromCustomerInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class RemoveExperimentFromCustomerSubscriptionInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class ReportUsageBaseInput(BaseModel):
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    customer_id: str = Field(alias="customerId")
    feature_id: str = Field(alias="featureId")
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    update_behavior: Optional[UsageUpdateBehavior] = Field(
        alias="updateBehavior", default=UsageUpdateBehavior.DELTA
    )
    value: float


class ReportUsageBulkInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    usages: List["ReportUsageBaseInput"]


class ReportUsageInput(BaseModel):
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_id: str = Field(alias="featureId")
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    update_behavior: Optional[UsageUpdateBehavior] = Field(
        alias="updateBehavior", default=UsageUpdateBehavior.DELTA
    )
    value: float


class ResyncIntegrationInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    vendor_identifier: VendorIdentifier = Field(alias="vendorIdentifier")


class RevokePromotionalEntitlementInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_id: str = Field(alias="featureId")


class SalesforceCredentialsInput(BaseModel):
    domain: Optional[str] = None


class SetBasePlanOnPlanInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class SetCompatibleAddonsOnPlanInput(BaseModel):
    id: str
    relation_ids: List[str] = Field(alias="relationIds")


class SetCouponOnCustomerInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class SetCouponOnCustomerSubscriptionInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class SetExperimentOnCustomerInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class SetExperimentOnCustomerSubscriptionInput(BaseModel):
    id: str
    relation_id: str = Field(alias="relationId")


class SetPackageGroupAddons(BaseModel):
    addons: List[str]
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    package_group_id: str = Field(alias="packageGroupId")


class SetPlanCompatiblePackageGroup(BaseModel):
    options: Optional["SetPlanCompatiblePackageGroupOptions"] = None
    package_group_id: str = Field(alias="packageGroupId")


class SetPlanCompatiblePackageGroupOptions(BaseModel):
    free_items: Optional[float] = Field(alias="freeItems", default=None)
    min_items: Optional[float] = Field(alias="minItems", default=None)


class SetPlanCompatiblePackageGroups(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    id: str
    package_groups: List["SetPlanCompatiblePackageGroup"] = Field(alias="packageGroups")


class SnowflakeCredentialsInput(BaseModel):
    database: str
    host: str
    password: str
    role: str
    schema_name: str = Field(alias="schemaName")
    username: str
    warehouse: str


class StartExperimentInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    ref_id: str = Field(alias="refId")


class StopExperimentInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    ref_id: str = Field(alias="refId")


class StringFieldComparison(BaseModel):
    eq: Optional[str] = None
    gt: Optional[str] = None
    gte: Optional[str] = None
    i_like: Optional[str] = Field(alias="iLike", default=None)
    in_: Optional[List[str]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[str] = None
    lt: Optional[str] = None
    lte: Optional[str] = None
    neq: Optional[str] = None
    not_i_like: Optional[str] = Field(alias="notILike", default=None)
    not_in: Optional[List[str]] = Field(alias="notIn", default=None)
    not_like: Optional[str] = Field(alias="notLike", default=None)


class StripeCredentialsInput(BaseModel):
    account_id: Optional[str] = Field(alias="accountId", default=None)
    authorization_code: str = Field(alias="authorizationCode")
    is_test_mode: bool = Field(alias="isTestMode")


class StripeCustomerSearchInput(BaseModel):
    customer_name: Optional[str] = Field(alias="customerName", default=None)
    environment_id: str = Field(alias="environmentId")
    next_page: Optional[str] = Field(alias="nextPage", default=None)


class StripeProductSearchInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    next_page: Optional[str] = Field(alias="nextPage", default=None)
    product_name: Optional[str] = Field(alias="productName", default=None)


class StripeSubscriptionSearchInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    next_page: Optional[str] = Field(alias="nextPage", default=None)


class SubscriptionAddonFilter(BaseModel):
    addon: Optional["SubscriptionAddonFilterAddonFilter"] = None
    and_: Optional[List["SubscriptionAddonFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["SubscriptionAddonFilter"]] = Field(alias="or", default=None)
    price: Optional["SubscriptionAddonFilterPriceFilter"] = None
    quantity: Optional["NumberFieldComparison"] = None
    subscription: Optional["SubscriptionAddonFilterCustomerSubscriptionFilter"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class SubscriptionAddonFilterAddonFilter(BaseModel):
    and_: Optional[List["SubscriptionAddonFilterAddonFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    is_latest: Optional["BooleanFieldComparison"] = Field(
        alias="isLatest", default=None
    )
    or_: Optional[List["SubscriptionAddonFilterAddonFilter"]] = Field(
        alias="or", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    product_id: Optional["StringFieldComparison"] = Field(
        alias="productId", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    status: Optional["PackageStatusFilterComparison"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    version_number: Optional["IntFieldComparison"] = Field(
        alias="versionNumber", default=None
    )


class SubscriptionAddonFilterCustomerSubscriptionFilter(BaseModel):
    and_: Optional[List["SubscriptionAddonFilterCustomerSubscriptionFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    cancel_reason: Optional["SubscriptionCancelReasonFilterComparison"] = Field(
        alias="cancelReason", default=None
    )
    cancellation_date: Optional["DateFieldComparison"] = Field(
        alias="cancellationDate", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    crm_link_url: Optional["StringFieldComparison"] = Field(
        alias="crmLinkUrl", default=None
    )
    current_billing_period_end: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodEnd", default=None
    )
    current_billing_period_start: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodStart", default=None
    )
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    effective_end_date: Optional["DateFieldComparison"] = Field(
        alias="effectiveEndDate", default=None
    )
    end_date: Optional["DateFieldComparison"] = Field(alias="endDate", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    old_billing_id: Optional["StringFieldComparison"] = Field(
        alias="oldBillingId", default=None
    )
    or_: Optional[List["SubscriptionAddonFilterCustomerSubscriptionFilter"]] = Field(
        alias="or", default=None
    )
    payment_collection: Optional["PaymentCollectionFilterComparison"] = Field(
        alias="paymentCollection", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    start_date: Optional["DateFieldComparison"] = Field(alias="startDate", default=None)
    status: Optional["SubscriptionStatusFilterComparison"] = None
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    trial_end_date: Optional["DateFieldComparison"] = Field(
        alias="trialEndDate", default=None
    )


class SubscriptionAddonFilterPriceFilter(BaseModel):
    and_: Optional[List["SubscriptionAddonFilterPriceFilter"]] = Field(
        alias="and", default=None
    )
    billing_cadence: Optional["BillingCadenceFilterComparison"] = Field(
        alias="billingCadence", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    billing_model: Optional["BillingModelFilterComparison"] = Field(
        alias="billingModel", default=None
    )
    billing_period: Optional["BillingPeriodFilterComparison"] = Field(
        alias="billingPeriod", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["SubscriptionAddonFilterPriceFilter"]] = Field(
        alias="or", default=None
    )
    tiers_mode: Optional["TiersModeFilterComparison"] = Field(
        alias="tiersMode", default=None
    )


class SubscriptionAddonInput(BaseModel):
    addon_id: str = Field(alias="addonId")
    quantity: Optional[int] = 1


class SubscriptionAddonSort(BaseModel):
    direction: SortDirection
    field: SubscriptionAddonSortFields
    nulls: Optional[SortNulls] = None


class SubscriptionBillingInfo(BaseModel):
    billing_address: Optional["BillingAddress"] = Field(
        alias="billingAddress", default=None
    )
    charge_on_behalf_of_account: Optional[str] = Field(
        alias="chargeOnBehalfOfAccount", default=None
    )
    coupon_id: Optional[str] = Field(alias="couponId", default=None)
    is_backdated: Optional[bool] = Field(alias="isBackdated", default=False)
    is_invoice_paid: Optional[bool] = Field(alias="isInvoicePaid", default=False)
    metadata: Optional[Any] = None
    tax_percentage: Optional[float] = Field(alias="taxPercentage", default=None)
    tax_rate_ids: Optional[List[str]] = Field(alias="taxRateIds", default=None)


class SubscriptionCancelReasonFilterComparison(BaseModel):
    eq: Optional[SubscriptionCancelReason] = None
    gt: Optional[SubscriptionCancelReason] = None
    gte: Optional[SubscriptionCancelReason] = None
    i_like: Optional[SubscriptionCancelReason] = Field(alias="iLike", default=None)
    in_: Optional[List[SubscriptionCancelReason]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[SubscriptionCancelReason] = None
    lt: Optional[SubscriptionCancelReason] = None
    lte: Optional[SubscriptionCancelReason] = None
    neq: Optional[SubscriptionCancelReason] = None
    not_i_like: Optional[SubscriptionCancelReason] = Field(
        alias="notILike", default=None
    )
    not_in: Optional[List[SubscriptionCancelReason]] = Field(
        alias="notIn", default=None
    )
    not_like: Optional[SubscriptionCancelReason] = Field(alias="notLike", default=None)


class SubscriptionCancellationInput(BaseModel):
    end_date: Optional[Any] = Field(alias="endDate", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    prorate: Optional[bool] = None
    subscription_cancellation_action: Optional[SubscriptionCancellationAction] = Field(
        alias="subscriptionCancellationAction", default=None
    )
    subscription_cancellation_time: Optional[SubscriptionCancellationTime] = Field(
        alias="subscriptionCancellationTime", default=None
    )
    subscription_ref_id: str = Field(alias="subscriptionRefId")


class SubscriptionEntitlementFilter(BaseModel):
    and_: Optional[List["SubscriptionEntitlementFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature: Optional["SubscriptionEntitlementFilterFeatureFilter"] = None
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["SubscriptionEntitlementFilter"]] = Field(
        alias="or", default=None
    )
    subscription: Optional[
        "SubscriptionEntitlementFilterCustomerSubscriptionFilter"
    ] = None
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class SubscriptionEntitlementFilterCustomerSubscriptionFilter(BaseModel):
    and_: Optional[
        List["SubscriptionEntitlementFilterCustomerSubscriptionFilter"]
    ] = Field(alias="and", default=None)
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    cancel_reason: Optional["SubscriptionCancelReasonFilterComparison"] = Field(
        alias="cancelReason", default=None
    )
    cancellation_date: Optional["DateFieldComparison"] = Field(
        alias="cancellationDate", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    crm_link_url: Optional["StringFieldComparison"] = Field(
        alias="crmLinkUrl", default=None
    )
    current_billing_period_end: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodEnd", default=None
    )
    current_billing_period_start: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodStart", default=None
    )
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    effective_end_date: Optional["DateFieldComparison"] = Field(
        alias="effectiveEndDate", default=None
    )
    end_date: Optional["DateFieldComparison"] = Field(alias="endDate", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    old_billing_id: Optional["StringFieldComparison"] = Field(
        alias="oldBillingId", default=None
    )
    or_: Optional[
        List["SubscriptionEntitlementFilterCustomerSubscriptionFilter"]
    ] = Field(alias="or", default=None)
    payment_collection: Optional["PaymentCollectionFilterComparison"] = Field(
        alias="paymentCollection", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    start_date: Optional["DateFieldComparison"] = Field(alias="startDate", default=None)
    status: Optional["SubscriptionStatusFilterComparison"] = None
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    trial_end_date: Optional["DateFieldComparison"] = Field(
        alias="trialEndDate", default=None
    )


class SubscriptionEntitlementFilterFeatureFilter(BaseModel):
    and_: Optional[List["SubscriptionEntitlementFilterFeatureFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature_status: Optional["FeatureStatusFilterComparison"] = Field(
        alias="featureStatus", default=None
    )
    feature_type: Optional["FeatureTypeFilterComparison"] = Field(
        alias="featureType", default=None
    )
    id: Optional["StringFieldComparison"] = None
    meter_type: Optional["MeterTypeFilterComparison"] = Field(
        alias="meterType", default=None
    )
    or_: Optional[List["SubscriptionEntitlementFilterFeatureFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class SubscriptionEntitlementInput(BaseModel):
    description: Optional[str] = None
    feature_id: str = Field(alias="featureId")
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class SubscriptionEntitlementSort(BaseModel):
    direction: SortDirection
    field: SubscriptionEntitlementSortFields
    nulls: Optional[SortNulls] = None


class SubscriptionInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    addons: Optional[List["SubscriptionAddonInput"]] = None
    await_payment_confirmation: Optional[bool] = Field(
        alias="awaitPaymentConfirmation", default=True
    )
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_country_code: Optional[str] = Field(
        alias="billingCountryCode", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    budget: Optional["BudgetConfigurationInput"] = None
    crm_id: Optional[str] = Field(alias="crmId", default=None)
    customer_id: str = Field(alias="customerId")
    end_date: Optional[Any] = Field(alias="endDate", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    is_custom_price_subscription: Optional[bool] = Field(
        alias="isCustomPriceSubscription", default=False
    )
    is_overriding_trial_config: Optional[bool] = Field(
        alias="isOverridingTrialConfig", default=False
    )
    is_trial: Optional[bool] = Field(alias="isTrial", default=None)
    minimum_spend: Optional["SubscriptionMinimumSpendValueInput"] = Field(
        alias="minimumSpend", default=None
    )
    payment_collection_method: Optional[PaymentCollectionMethod] = Field(
        alias="paymentCollectionMethod", default=PaymentCollectionMethod.CHARGE
    )
    plan_id: str = Field(alias="planId")
    price_overrides: Optional[List["PriceOverrideInput"]] = Field(
        alias="priceOverrides", default=None
    )
    price_unit_amount: Optional[float] = Field(alias="priceUnitAmount", default=None)
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    schedule_strategy: Optional[ScheduleStrategy] = Field(
        alias="scheduleStrategy", default=None
    )
    start_date: Optional[Any] = Field(alias="startDate", default=None)
    subscription_entitlements: Optional[List["SubscriptionEntitlementInput"]] = Field(
        alias="subscriptionEntitlements", default=None
    )
    subscription_id: Optional[str] = Field(alias="subscriptionId", default=None)
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=-1)


class SubscriptionMigrationInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    subscription_id: str = Field(alias="subscriptionId")
    subscription_migration_time: Optional[SubscriptionMigrationTime] = Field(
        alias="subscriptionMigrationTime", default=None
    )


class SubscriptionMigrationTaskFilter(BaseModel):
    and_: Optional[List["SubscriptionMigrationTaskFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["SubscriptionMigrationTaskFilter"]] = Field(
        alias="or", default=None
    )
    status: Optional["TaskStatusFilterComparison"] = None
    task_type: Optional["TaskTypeFilterComparison"] = Field(
        alias="taskType", default=None
    )


class SubscriptionMigrationTaskSort(BaseModel):
    direction: SortDirection
    field: SubscriptionMigrationTaskSortFields
    nulls: Optional[SortNulls] = None


class SubscriptionMinimumSpendValueInput(BaseModel):
    minimum: Optional["MoneyInputDTO"] = None


class SubscriptionPriceFilter(BaseModel):
    and_: Optional[List["SubscriptionPriceFilter"]] = Field(alias="and", default=None)
    billing_model: Optional["BillingModelFilterComparison"] = Field(
        alias="billingModel", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    feature_id: Optional["StringFieldComparison"] = Field(
        alias="featureId", default=None
    )
    has_soft_limit: Optional["BooleanFieldComparison"] = Field(
        alias="hasSoftLimit", default=None
    )
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["SubscriptionPriceFilter"]] = Field(alias="or", default=None)
    price: Optional["SubscriptionPriceFilterPriceFilter"] = None
    subscription: Optional["SubscriptionPriceFilterCustomerSubscriptionFilter"] = None
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)
    usage_limit: Optional["NumberFieldComparison"] = Field(
        alias="usageLimit", default=None
    )


class SubscriptionPriceFilterCustomerSubscriptionFilter(BaseModel):
    and_: Optional[List["SubscriptionPriceFilterCustomerSubscriptionFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    cancel_reason: Optional["SubscriptionCancelReasonFilterComparison"] = Field(
        alias="cancelReason", default=None
    )
    cancellation_date: Optional["DateFieldComparison"] = Field(
        alias="cancellationDate", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    crm_link_url: Optional["StringFieldComparison"] = Field(
        alias="crmLinkUrl", default=None
    )
    current_billing_period_end: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodEnd", default=None
    )
    current_billing_period_start: Optional["DateFieldComparison"] = Field(
        alias="currentBillingPeriodStart", default=None
    )
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    effective_end_date: Optional["DateFieldComparison"] = Field(
        alias="effectiveEndDate", default=None
    )
    end_date: Optional["DateFieldComparison"] = Field(alias="endDate", default=None)
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    old_billing_id: Optional["StringFieldComparison"] = Field(
        alias="oldBillingId", default=None
    )
    or_: Optional[List["SubscriptionPriceFilterCustomerSubscriptionFilter"]] = Field(
        alias="or", default=None
    )
    payment_collection: Optional["PaymentCollectionFilterComparison"] = Field(
        alias="paymentCollection", default=None
    )
    pricing_type: Optional["PricingTypeFilterComparison"] = Field(
        alias="pricingType", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    resource_id: Optional["StringFieldComparison"] = Field(
        alias="resourceId", default=None
    )
    start_date: Optional["DateFieldComparison"] = Field(alias="startDate", default=None)
    status: Optional["SubscriptionStatusFilterComparison"] = None
    subscription_id: Optional["StringFieldComparison"] = Field(
        alias="subscriptionId", default=None
    )
    trial_end_date: Optional["DateFieldComparison"] = Field(
        alias="trialEndDate", default=None
    )


class SubscriptionPriceFilterPriceFilter(BaseModel):
    and_: Optional[List["SubscriptionPriceFilterPriceFilter"]] = Field(
        alias="and", default=None
    )
    billing_cadence: Optional["BillingCadenceFilterComparison"] = Field(
        alias="billingCadence", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    billing_model: Optional["BillingModelFilterComparison"] = Field(
        alias="billingModel", default=None
    )
    billing_period: Optional["BillingPeriodFilterComparison"] = Field(
        alias="billingPeriod", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["SubscriptionPriceFilterPriceFilter"]] = Field(
        alias="or", default=None
    )
    tiers_mode: Optional["TiersModeFilterComparison"] = Field(
        alias="tiersMode", default=None
    )


class SubscriptionPriceSort(BaseModel):
    direction: SortDirection
    field: SubscriptionPriceSortFields
    nulls: Optional[SortNulls] = None


class SubscriptionStatusFilterComparison(BaseModel):
    eq: Optional[SubscriptionStatus] = None
    gt: Optional[SubscriptionStatus] = None
    gte: Optional[SubscriptionStatus] = None
    i_like: Optional[SubscriptionStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[SubscriptionStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[SubscriptionStatus] = None
    lt: Optional[SubscriptionStatus] = None
    lte: Optional[SubscriptionStatus] = None
    neq: Optional[SubscriptionStatus] = None
    not_i_like: Optional[SubscriptionStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[SubscriptionStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[SubscriptionStatus] = Field(alias="notLike", default=None)


class SubscriptionUpdateScheduleCancellationInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    status: Optional[SubscriptionScheduleStatus] = SubscriptionScheduleStatus.Scheduled
    subscription_id: str = Field(alias="subscriptionId")


class SyncTaxRatesInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class TaskStatusFilterComparison(BaseModel):
    eq: Optional[TaskStatus] = None
    gt: Optional[TaskStatus] = None
    gte: Optional[TaskStatus] = None
    i_like: Optional[TaskStatus] = Field(alias="iLike", default=None)
    in_: Optional[List[TaskStatus]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[TaskStatus] = None
    lt: Optional[TaskStatus] = None
    lte: Optional[TaskStatus] = None
    neq: Optional[TaskStatus] = None
    not_i_like: Optional[TaskStatus] = Field(alias="notILike", default=None)
    not_in: Optional[List[TaskStatus]] = Field(alias="notIn", default=None)
    not_like: Optional[TaskStatus] = Field(alias="notLike", default=None)


class TaskTypeFilterComparison(BaseModel):
    eq: Optional[TaskType] = None
    gt: Optional[TaskType] = None
    gte: Optional[TaskType] = None
    i_like: Optional[TaskType] = Field(alias="iLike", default=None)
    in_: Optional[List[TaskType]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[TaskType] = None
    lt: Optional[TaskType] = None
    lte: Optional[TaskType] = None
    neq: Optional[TaskType] = None
    not_i_like: Optional[TaskType] = Field(alias="notILike", default=None)
    not_in: Optional[List[TaskType]] = Field(alias="notIn", default=None)
    not_like: Optional[TaskType] = Field(alias="notLike", default=None)


class TaxExempt(BaseModel):
    type: str
    value: str


class TestHookInput(BaseModel):
    endpoint_url: str = Field(alias="endpointUrl")
    environment_id: str = Field(alias="environmentId")
    hook_event_type: EventLogType = Field(alias="hookEventType")


class TiersModeFilterComparison(BaseModel):
    eq: Optional[TiersMode] = None
    gt: Optional[TiersMode] = None
    gte: Optional[TiersMode] = None
    i_like: Optional[TiersMode] = Field(alias="iLike", default=None)
    in_: Optional[List[TiersMode]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[TiersMode] = None
    lt: Optional[TiersMode] = None
    lte: Optional[TiersMode] = None
    neq: Optional[TiersMode] = None
    not_i_like: Optional[TiersMode] = Field(alias="notILike", default=None)
    not_in: Optional[List[TiersMode]] = Field(alias="notIn", default=None)
    not_like: Optional[TiersMode] = Field(alias="notLike", default=None)


class TransferSubscriptionInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    destination_resource_id: str = Field(alias="destinationResourceId")
    source_resource_id: str = Field(alias="sourceResourceId")


class TrialOverrideConfigurationInput(BaseModel):
    is_trial: bool = Field(alias="isTrial")
    trial_end_date: Optional[Any] = Field(alias="trialEndDate", default=None)


class TriggerSubscriptionBillingMonthEndsSoonWebhookInput(BaseModel):
    subscription_id: str = Field(alias="subscriptionId")


class TriggerSubscriptionMigrationInput(BaseModel):
    environment_id: str = Field(alias="environmentId")
    ref_id: str = Field(alias="refId")
    version_number: float = Field(alias="versionNumber")


class TriggerSubscriptionUsageSyncInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    resource_id: Optional[str] = Field(alias="resourceId", default=None)


class TypographyConfigurationInput(BaseModel):
    body: Optional["FontVariantInput"] = None
    font_family: Optional[str] = Field(alias="fontFamily", default=None)
    h_1: Optional["FontVariantInput"] = Field(alias="h1", default=None)
    h_2: Optional["FontVariantInput"] = Field(alias="h2", default=None)
    h_3: Optional["FontVariantInput"] = Field(alias="h3", default=None)


class UnarchiveCustomerInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)


class UnarchiveEnvironmentInput(BaseModel):
    id: Optional[str] = None
    slug: Optional[str] = None


class UpdateAccountInput(BaseModel):
    display_name: str = Field(alias="displayName")
    id: Optional[str] = None
    subscription_billing_anchor: Optional[BillingAnchor] = Field(
        alias="subscriptionBillingAnchor", default=None
    )
    subscription_proration_behavior: Optional[ProrationBehavior] = Field(
        alias="subscriptionProrationBehavior", default=None
    )
    timezone: Optional[str] = None


class UpdateCouponInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    description: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: str
    ref_id: str = Field(alias="refId")


class UpdateCustomerInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    aws_marketplace_customer_id: Optional[str] = Field(
        alias="awsMarketplaceCustomerId", default=None
    )
    billing_id: Optional[str] = Field(alias="billingId", default=None)
    billing_information: Optional["CustomerBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    coupon_ref_id: Optional[str] = Field(alias="couponRefId", default=None)
    crm_id: Optional[str] = Field(alias="crmId", default=None)
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    email: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: Optional[str] = None
    ref_id: Optional[str] = Field(alias="refId", default=None)
    salesforce_id: Optional[str] = Field(alias="salesforceId", default=None)
    should_wait_sync: Optional[bool] = Field(alias="shouldWaitSync", default=False)


class UpdateExperimentInput(BaseModel):
    control_group_name: Optional[str] = Field(alias="controlGroupName", default=None)
    description: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    name: Optional[str] = None
    product_id: Optional[str] = Field(alias="productId", default=None)
    product_settings: Optional["ProductSettingsInput"] = Field(
        alias="productSettings", default=None
    )
    ref_id: str = Field(alias="refId")
    variant_group_name: Optional[str] = Field(alias="variantGroupName", default=None)
    variant_percentage: Optional[float] = Field(alias="variantPercentage", default=None)


class UpdateFeature(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_status: Optional[FeatureStatus] = Field(alias="featureStatus", default=None)
    feature_type: Optional[FeatureType] = Field(alias="featureType", default=None)
    feature_units: Optional[str] = Field(alias="featureUnits", default=None)
    feature_units_plural: Optional[str] = Field(
        alias="featureUnitsPlural", default=None
    )
    id: Optional[str] = None
    meter_type: Optional[MeterType] = Field(alias="meterType", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    updated_at: Optional[Any] = Field(alias="updatedAt", default=None)


class UpdateFeatureInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    description: Optional[str] = None
    display_name: Optional[str] = Field(alias="displayName", default=None)
    environment_id: str = Field(alias="environmentId")
    feature_units: Optional[str] = Field(alias="featureUnits", default=None)
    feature_units_plural: Optional[str] = Field(
        alias="featureUnitsPlural", default=None
    )
    meter: Optional["CreateMeter"] = None
    ref_id: str = Field(alias="refId")


class UpdateHook(BaseModel):
    configuration: Optional[Any] = None
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    description: Optional[str] = None
    endpoint: Optional[str] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    event_log_types: Optional[List[EventLogType]] = Field(
        alias="eventLogTypes", default=None
    )
    id: Optional[str] = None
    secret_key: Optional[str] = Field(alias="secretKey", default=None)
    status: Optional[HookStatus] = None


class UpdateIntegrationInput(BaseModel):
    salesforce_credentials: Optional["SalesforceCredentialsInput"] = Field(
        alias="salesforceCredentials", default=None
    )
    stripe_credentials: Optional["StripeCredentialsInput"] = Field(
        alias="stripeCredentials", default=None
    )
    vendor_identifier: VendorIdentifier = Field(alias="vendorIdentifier")
    zuora_credentials: Optional["ZuoraCredentialsInput"] = Field(
        alias="zuoraCredentials", default=None
    )


class UpdateOneEnvironmentInput(BaseModel):
    id: str
    update: "EnvironmentInput"


class UpdateOneFeatureInput(BaseModel):
    id: str
    update: "UpdateFeature"


class UpdateOneHookInput(BaseModel):
    id: str
    update: "UpdateHook"


class UpdateOneIntegrationInput(BaseModel):
    id: str
    update: "UpdateIntegrationInput"


class UpdateOnePackageEntitlementInput(BaseModel):
    id: str
    update: "PackageEntitlementUpdateInput"


class UpdateOneProductInput(BaseModel):
    id: str
    update: "ProductUpdateInput"


class UpdateOnePromotionalEntitlementInput(BaseModel):
    id: str
    update: "PromotionalEntitlementUpdateInput"


class UpdatePackageEntitlementOrderInput(BaseModel):
    entitlements: List["UpdatePackageEntitlementOrderItemInput"]
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    package_id: str = Field(alias="packageId")


class UpdatePackageEntitlementOrderItemInput(BaseModel):
    id: str
    order: Optional[float] = None


class UpdateSubscriptionEntitlementInput(BaseModel):
    feature_id: Optional[str] = Field(alias="featureId", default=None)
    has_soft_limit: Optional[bool] = Field(alias="hasSoftLimit", default=None)
    has_unlimited_usage: Optional[bool] = Field(alias="hasUnlimitedUsage", default=None)
    id: Optional[str] = None
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    usage_limit: Optional[float] = Field(alias="usageLimit", default=None)
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class UpdateSubscriptionInput(BaseModel):
    additional_meta_data: Optional[Any] = Field(
        alias="additionalMetaData", default=None
    )
    addons: Optional[List["SubscriptionAddonInput"]] = None
    await_payment_confirmation: Optional[bool] = Field(
        alias="awaitPaymentConfirmation", default=True
    )
    billable_features: Optional[List["BillableFeatureInput"]] = Field(
        alias="billableFeatures", default=None
    )
    billing_information: Optional["SubscriptionBillingInfo"] = Field(
        alias="billingInformation", default=None
    )
    billing_period: Optional[BillingPeriod] = Field(alias="billingPeriod", default=None)
    budget: Optional["BudgetConfigurationInput"] = None
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    minimum_spend: Optional["SubscriptionMinimumSpendValueInput"] = Field(
        alias="minimumSpend", default=None
    )
    price_overrides: Optional[List["PriceOverrideInput"]] = Field(
        alias="priceOverrides", default=None
    )
    promotion_code: Optional[str] = Field(alias="promotionCode", default=None)
    ref_id: Optional[str] = Field(alias="refId", default=None)
    schedule_strategy: Optional[ScheduleStrategy] = Field(
        alias="scheduleStrategy", default=None
    )
    subscription_entitlements: Optional[
        List["UpdateSubscriptionEntitlementInput"]
    ] = Field(alias="subscriptionEntitlements", default=None)
    subscription_id: Optional[str] = Field(alias="subscriptionId", default=None)
    trial_end_date: Optional[Any] = Field(alias="trialEndDate", default=None)
    unit_quantity: Optional[float] = Field(alias="unitQuantity", default=None)


class UpdateUserInput(BaseModel):
    department: Optional[Department] = None
    name: str


class UsageEventReportInput(BaseModel):
    customer_id: str = Field(alias="customerId")
    dimensions: Optional[Any] = None
    event_name: str = Field(alias="eventName")
    idempotency_key: str = Field(alias="idempotencyKey")
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    timestamp: Optional[Any] = None


class UsageEventsInput(BaseModel):
    customer_id: Optional[str] = Field(alias="customerId", default=None)
    environment_id: str = Field(alias="environmentId")
    filters: Optional[List["MeterFilterDefinitionInput"]] = None


class UsageEventsReportInput(BaseModel):
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    usage_events: List["UsageEventReportInput"] = Field(alias="usageEvents")


class UsageHistoryInput(BaseModel):
    customer_ref_id: str = Field(alias="customerRefId")
    end_date: Optional[Any] = Field(alias="endDate", default=None)
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_ref_id: str = Field(alias="featureRefId")
    group_by: Optional[List[str]] = Field(alias="groupBy", default=None)
    monthly_reset_period_configuration: Optional[
        "MonthlyResetPeriodConfigInput"
    ] = Field(alias="monthlyResetPeriodConfiguration", default=None)
    reset_period: Optional[EntitlementResetPeriod] = Field(
        alias="resetPeriod", default=None
    )
    resource_ref_id: Optional[str] = Field(alias="resourceRefId", default=None)
    start_date: Any = Field(alias="startDate")
    weekly_reset_period_configuration: Optional["WeeklyResetPeriodConfigInput"] = Field(
        alias="weeklyResetPeriodConfiguration", default=None
    )
    yearly_reset_period_configuration: Optional["YearlyResetPeriodConfigInput"] = Field(
        alias="yearlyResetPeriodConfiguration", default=None
    )


class UsageMeasurementCreateInput(BaseModel):
    created_at: Optional[Any] = Field(alias="createdAt", default=None)
    customer_id: str = Field(alias="customerId")
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    feature_id: str = Field(alias="featureId")
    resource_id: Optional[str] = Field(alias="resourceId", default=None)
    update_behavior: Optional[UsageUpdateBehavior] = Field(
        alias="updateBehavior", default=UsageUpdateBehavior.DELTA
    )
    value: float


class UsageMeasurementFilter(BaseModel):
    and_: Optional[List["UsageMeasurementFilter"]] = Field(alias="and", default=None)
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    customer: Optional["UsageMeasurementFilterCustomerFilter"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature: Optional["UsageMeasurementFilterFeatureFilter"] = None
    id: Optional["StringFieldComparison"] = None
    or_: Optional[List["UsageMeasurementFilter"]] = Field(alias="or", default=None)


class UsageMeasurementFilterCustomerFilter(BaseModel):
    and_: Optional[List["UsageMeasurementFilterCustomerFilter"]] = Field(
        alias="and", default=None
    )
    billing_id: Optional["StringFieldComparison"] = Field(
        alias="billingId", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    crm_hubspot_company_id: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyId", default=None
    )
    crm_hubspot_company_url: Optional["StringFieldComparison"] = Field(
        alias="crmHubspotCompanyUrl", default=None
    )
    crm_id: Optional["StringFieldComparison"] = Field(alias="crmId", default=None)
    customer_id: Optional["StringFieldComparison"] = Field(
        alias="customerId", default=None
    )
    deleted_at: Optional["DateFieldComparison"] = Field(alias="deletedAt", default=None)
    email: Optional["StringFieldComparison"] = None
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    id: Optional["StringFieldComparison"] = None
    name: Optional["StringFieldComparison"] = None
    or_: Optional[List["UsageMeasurementFilterCustomerFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    search_query: Optional["CustomerSearchQueryFilterComparison"] = Field(
        alias="searchQuery", default=None
    )
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class UsageMeasurementFilterFeatureFilter(BaseModel):
    and_: Optional[List["UsageMeasurementFilterFeatureFilter"]] = Field(
        alias="and", default=None
    )
    created_at: Optional["DateFieldComparison"] = Field(alias="createdAt", default=None)
    description: Optional["StringFieldComparison"] = None
    display_name: Optional["StringFieldComparison"] = Field(
        alias="displayName", default=None
    )
    environment_id: Optional["StringFieldComparison"] = Field(
        alias="environmentId", default=None
    )
    feature_status: Optional["FeatureStatusFilterComparison"] = Field(
        alias="featureStatus", default=None
    )
    feature_type: Optional["FeatureTypeFilterComparison"] = Field(
        alias="featureType", default=None
    )
    id: Optional["StringFieldComparison"] = None
    meter_type: Optional["MeterTypeFilterComparison"] = Field(
        alias="meterType", default=None
    )
    or_: Optional[List["UsageMeasurementFilterFeatureFilter"]] = Field(
        alias="or", default=None
    )
    ref_id: Optional["StringFieldComparison"] = Field(alias="refId", default=None)
    updated_at: Optional["DateFieldComparison"] = Field(alias="updatedAt", default=None)


class UsageMeasurementSort(BaseModel):
    direction: SortDirection
    field: UsageMeasurementSortFields
    nulls: Optional[SortNulls] = None


class ValidateMergeEnvironmentInput(BaseModel):
    destination_environment_slug: str = Field(alias="destinationEnvironmentSlug")
    source_environment_slug: str = Field(alias="sourceEnvironmentSlug")


class VendorIdentifierFilterComparison(BaseModel):
    eq: Optional[VendorIdentifier] = None
    gt: Optional[VendorIdentifier] = None
    gte: Optional[VendorIdentifier] = None
    i_like: Optional[VendorIdentifier] = Field(alias="iLike", default=None)
    in_: Optional[List[VendorIdentifier]] = Field(alias="in", default=None)
    is_: Optional[bool] = Field(alias="is", default=None)
    is_not: Optional[bool] = Field(alias="isNot", default=None)
    like: Optional[VendorIdentifier] = None
    lt: Optional[VendorIdentifier] = None
    lte: Optional[VendorIdentifier] = None
    neq: Optional[VendorIdentifier] = None
    not_i_like: Optional[VendorIdentifier] = Field(alias="notILike", default=None)
    not_in: Optional[List[VendorIdentifier]] = Field(alias="notIn", default=None)
    not_like: Optional[VendorIdentifier] = Field(alias="notLike", default=None)


class WeeklyResetPeriodConfigInput(BaseModel):
    according_to: WeeklyAccordingTo = Field(alias="accordingTo")


class WidgetConfigurationUpdateInput(BaseModel):
    checkout_configuration: Optional["CheckoutConfigurationInput"] = Field(
        alias="checkoutConfiguration", default=None
    )
    customer_portal_configuration: Optional["CustomerPortalConfigurationInput"] = Field(
        alias="customerPortalConfiguration", default=None
    )
    environment_id: Optional[str] = Field(alias="environmentId", default=None)
    paywall_configuration: Optional["PaywallConfigurationInput"] = Field(
        alias="paywallConfiguration", default=None
    )


class YearlyResetPeriodConfigInput(BaseModel):
    according_to: YearlyAccordingTo = Field(alias="accordingTo")


class ZuoraCredentialsInput(BaseModel):
    base_url: str = Field(alias="baseUrl")
    client_id: str = Field(alias="clientId")
    client_secret: str = Field(alias="clientSecret")
