# Generated by ariadne-codegen
# Source: queries.graphql

from typing import Annotated, Any, Literal, Optional, Union

from pydantic import Field

from .base_model import BaseModel
from .enums import BulkOperationErrorCode, BulkOperationStatus


class GetBulkOperation(BaseModel):
    node: Optional[
        Annotated[
            Union["GetBulkOperationNodeNode", "GetBulkOperationNodeBulkOperation"],
            Field(discriminator="typename__"),
        ]
    ]


class GetBulkOperationNodeNode(BaseModel):
    typename__: Literal[
        "AbandonedCheckout",
        "AbandonedCheckoutLineItem",
        "Abandonment",
        "AddAllProductsOperation",
        "AdditionalFee",
        "App",
        "AppCatalog",
        "AppCredit",
        "AppInstallation",
        "AppPurchaseOneTime",
        "AppRevenueAttributionRecord",
        "AppSubscription",
        "AppUsageRecord",
        "Article",
        "BasicEvent",
        "Blog",
        "BusinessEntity",
        "CalculatedOrder",
        "CartTransform",
        "CashTrackingAdjustment",
        "CashTrackingSession",
        "CatalogCsvOperation",
        "Channel",
        "ChannelDefinition",
        "ChannelInformation",
        "CheckoutProfile",
        "Collection",
        "Comment",
        "CommentEvent",
        "Company",
        "CompanyAddress",
        "CompanyContact",
        "CompanyContactRole",
        "CompanyContactRoleAssignment",
        "CompanyLocation",
        "CompanyLocationCatalog",
        "CompanyLocationStaffMemberAssignment",
        "Customer",
        "CustomerAccountAppExtensionPage",
        "CustomerAccountNativePage",
        "CustomerPaymentMethod",
        "CustomerSegmentMembersQuery",
        "CustomerVisit",
        "DeliveryCarrierService",
        "DeliveryCondition",
        "DeliveryCountry",
        "DeliveryCustomization",
        "DeliveryLocationGroup",
        "DeliveryMethod",
        "DeliveryMethodDefinition",
        "DeliveryParticipant",
        "DeliveryProfile",
        "DeliveryProfileItem",
        "DeliveryPromiseProvider",
        "DeliveryProvince",
        "DeliveryRateDefinition",
        "DeliveryZone",
        "DiscountAutomaticBxgy",
        "DiscountAutomaticNode",
        "DiscountCodeNode",
        "DiscountNode",
        "DiscountRedeemCodeBulkCreation",
        "Domain",
        "DraftOrder",
        "DraftOrderLineItem",
        "DraftOrderTag",
        "Duty",
        "ExchangeLineItem",
        "ExchangeV2",
        "ExternalVideo",
        "Fulfillment",
        "FulfillmentConstraintRule",
        "FulfillmentEvent",
        "FulfillmentHold",
        "FulfillmentLineItem",
        "FulfillmentOrder",
        "FulfillmentOrderDestination",
        "FulfillmentOrderLineItem",
        "FulfillmentOrderMerchantRequest",
        "GenericFile",
        "GiftCard",
        "GiftCardCreditTransaction",
        "GiftCardDebitTransaction",
        "InventoryAdjustmentGroup",
        "InventoryItem",
        "InventoryItemMeasurement",
        "InventoryLevel",
        "InventoryQuantity",
        "LineItem",
        "LineItemGroup",
        "Location",
        "MailingAddress",
        "Market",
        "MarketCatalog",
        "MarketRegionCountry",
        "MarketWebPresence",
        "MarketingActivity",
        "MarketingEvent",
        "MediaImage",
        "Menu",
        "Metafield",
        "MetafieldDefinition",
        "MetafieldStorefrontVisibility",
        "Metaobject",
        "MetaobjectDefinition",
        "Model3d",
        "Node",
        "OnlineStoreTheme",
        "Order",
        "OrderAdjustment",
        "OrderDisputeSummary",
        "OrderTransaction",
        "Page",
        "PaymentCustomization",
        "PaymentMandate",
        "PaymentSchedule",
        "PaymentTerms",
        "PaymentTermsTemplate",
        "PriceList",
        "PriceRule",
        "PriceRuleDiscountCode",
        "PrivateMetafield",
        "Product",
        "ProductBundleOperation",
        "ProductDeleteOperation",
        "ProductDuplicateOperation",
        "ProductFeed",
        "ProductOption",
        "ProductOptionValue",
        "ProductSetOperation",
        "ProductTaxonomyNode",
        "ProductVariant",
        "ProductVariantComponent",
        "Publication",
        "PublicationResourceOperation",
        "QuantityPriceBreak",
        "Refund",
        "RefundShippingLine",
        "Return",
        "ReturnLineItem",
        "ReturnableFulfillment",
        "ReverseDelivery",
        "ReverseDeliveryLineItem",
        "ReverseFulfillmentOrder",
        "ReverseFulfillmentOrderDisposition",
        "ReverseFulfillmentOrderLineItem",
        "SaleAdditionalFee",
        "SavedSearch",
        "ScriptTag",
        "Segment",
        "SellingPlan",
        "SellingPlanGroup",
        "ServerPixel",
        "Shop",
        "ShopAddress",
        "ShopPolicy",
        "ShopifyPaymentsAccount",
        "ShopifyPaymentsBalanceTransaction",
        "ShopifyPaymentsBankAccount",
        "ShopifyPaymentsDispute",
        "ShopifyPaymentsDisputeEvidence",
        "ShopifyPaymentsDisputeFileUpload",
        "ShopifyPaymentsDisputeFulfillment",
        "ShopifyPaymentsPayout",
        "StaffMember",
        "StandardMetafieldDefinitionTemplate",
        "StoreCreditAccount",
        "StoreCreditAccountCreditTransaction",
        "StoreCreditAccountDebitRevertTransaction",
        "StoreCreditAccountDebitTransaction",
        "StorefrontAccessToken",
        "SubscriptionBillingAttempt",
        "SubscriptionContract",
        "SubscriptionDraft",
        "TaxonomyAttribute",
        "TaxonomyCategory",
        "TaxonomyChoiceListAttribute",
        "TaxonomyMeasurementAttribute",
        "TaxonomyValue",
        "TenderTransaction",
        "TransactionFee",
        "UnverifiedReturnLineItem",
        "UrlRedirect",
        "UrlRedirectImport",
        "Validation",
        "Video",
        "WebPixel",
        "WebhookSubscription",
    ] = Field(alias="__typename")


class GetBulkOperationNodeBulkOperation(BaseModel):
    typename__: Literal["BulkOperation"] = Field(alias="__typename")
    id: str
    status: BulkOperationStatus
    errorCode: Optional[BulkOperationErrorCode]
    createdAt: Any
    completedAt: Optional[Any]
    fileSize: Optional[Any]
    url: Optional[Any]


GetBulkOperation.model_rebuild()
