# generated by datamodel-codegen:
#   filename:  sell_feed_v1_oas3.yaml
#   timestamp: 2026-04-07T06:59:19+00:00

from __future__ import annotations

from typing import List, Optional

from pydantic import BaseModel, Field


class CreateTaskRequest(BaseModel):
    """
    The type that defines the fields for the <b> createTask</b> method.
    """

    feedType: Optional[str] = Field(
        None,
        description='The feed type associated with the task. Available feed types:<br><ul><li><a href="/api-docs/sell/static/feed/lms-feeds-quick-reference.html#trading-upload-feed-types" target="_blank">Inventory upload feed types</a></li><li><a href="/api-docs/sell/static/feed/lms-feeds-quick-reference.html#merchant-data-upload-feed-types" target="_blank">Fulfillment upload feed types</a></li><li><a href="/api-docs/sell/static/feed/fx-feeds-quick-reference.html#availabl" target="_blank">Seller Hub feed types</a></li></ul>',
    )
    schemaVersion: Optional[str] = Field(
        None,
        description='The schemaVersion/version number of the file format:<br><ul><li><a href="/api-docs/sell/static/feed/lms-feeds-quick-reference.html#Version" target="_blank">Version Details / Schema Version</a></li><li><a href="/api-docs/sell/static/feed/fx-feeds-quick-reference.html#schema" target="_blank">Seller Hub feed schema version</a></li></ul>',
    )


class CreateUserScheduleRequest(BaseModel):
    """
    The type that defines the fields for the <strong>createSchedule</strong> method.
    """

    feedType: Optional[str] = Field(
        None,
        description='The name of the feed type for the created schedule.<br><br> Use the <a href="/api-docs/sell/feed/resources/schedule/methods/getScheduleTemplates">getScheduleTemplates</a> method to retrieve the feed type of a schedule template.<br><br><span class="tablenote"><b>Note:</b> Schedules are currently only available for <code>LMS_ORDER_REPORT</code>.</span>',
    )
    preferredTriggerDayOfMonth: Optional[int] = Field(
        None,
        description="The preferred day of the month to trigger the schedule. This field can be used with <strong>preferredTriggerHour</strong> for monthly schedules. The last day of the month is used for numbers larger than the actual number of days in the month. <br /><br />This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value.<br /><br /><b>Minimum: </b>1<br /><br /><b>Maximum: </b>31",
    )
    preferredTriggerDayOfWeek: Optional[str] = Field(
        None,
        description="The preferred day of the week to trigger the schedule. This field can be used with <strong>preferredTriggerHour</strong> for weekly schedules. <br /><br />This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:DayOfWeekEnum'>eBay API documentation</a>",
    )
    preferredTriggerHour: Optional[str] = Field(
        None,
        description="The preferred two-digit hour of the day to trigger the schedule. <br /><br />This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value.<br /><br /><b>Format:</b> UTC <code>hhZ</code><br /><br />For example, the following represents 11:00 am UTC:<code> 11Z</code>",
    )
    scheduleEndDate: Optional[str] = Field(
        None,
        description="The timestamp on which the report generation (subscription) ends. After this date, the schedule status becomes <code>INACTIVE</code>. <br /><br />Use this field, if available, to end the schedule in the future. This value must be later than <strong>scheduleStartDate</strong> (if supplied). This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value.<br /><br /><b>Format:</b> UTC <code>yyyy-MM-dd<strong>T</strong>HH<strong>Z</strong></code><br /><br />For example, the following represents UTC October 10, 2021 at 10:00 AM:<br /><code>2021-10-10T10Z</code>",
    )
    scheduleName: Optional[str] = Field(
        None,
        description="The schedule name assigned by the user for the created schedule.",
    )
    scheduleStartDate: Optional[str] = Field(
        None,
        description="The timestamp to start generating the report. After this timestamp, the schedule status becomes active until either the <strong>scheduleEndDate</strong> occurs or the <strong>scheduleTemplateId</strong> becomes inactive. <br /><br />Use this field, if available, to start the schedule in the future but before the <strong>scheduleEndDate</strong> (if supplied). This field is available as specified by the template <strong>(scheduleTemplateId)</strong>. The template can specify this field as optional or required, and optionally provides a default value.<br /><br /><b>Format:</b> UTC <code>yyyy-MM-dd<strong>T</strong>HH<strong>Z</strong></code><br /><br />For example, the following represents a schedule start date of UTC October 01, 2020 at 12:00 PM:<br /><code> 2020-01-01T12Z</code>",
    )
    scheduleTemplateId: Optional[str] = Field(
        None,
        description='The unique identifier of the template to be used for this schedule. <br><br>Use the <a href="/api-docs/sell/feed/resources/schedule/methods/getScheduleTemplates">getScheduleTemplates</a> method to retrieve the schedule template ID. This method requires a schedule template ID that is <code>ACTIVE</code>.<br><br><span class="tablenote"><b>Note:</b> Schedules are currently only available for <code>LMS_ORDER_REPORT</code>.</span>',
    )
    schemaVersion: Optional[str] = Field(
        None, description="The schema version of a schedule."
    )


class CustomerServiceMetricsFilterCriteria(BaseModel):
    """
    A complex data type that filters data for report creation. See <strong>CustomerServiceMetricsFilterCriteria</strong> for fields and descriptions.
    """

    customerServiceMetricType: Optional[str] = Field(
        None,
        description="An enumeration value that specifies the customer service metric that eBay tracks to measure seller performance.<br><br>See <a href=\"/api-docs/sell/feed/types/api:CustomerServiceMetricTypeEnum\">CustomerServiceMetricTypeEnum</a> for values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:CustomerServiceMetricTypeEnum'>eBay API documentation</a>",
    )
    evaluationMarketplaceId: Optional[str] = Field(
        None,
        description="An enumeration value that specifies the eBay marketplace where the evaluation occurs.<br><br>See <a href=\"/api-docs/sell/feed/types/bas:MarketplaceIdEnum\">MarketplaceIdEnum</a> for values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/bas:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    listingCategories: Optional[List[str]] = Field(
        None,
        description='A list of listing category IDs on which the service metric is measured. A seller can use one or more L1 (top-level) eBay categories to get metrics specific to those L1 categories. The Category IDs for each L1 category are required. Category ID values for L1 categories can be retrieved using the Taxonomy API.<p> <span class="tablenote"><strong>Note: </strong>Pass this attribute to narrow down your filter results for the <code>ITEM_NOT_AS_DESCRIBED</code> customerServiceMetricType.</span></p> <p>Supported categories include:</p><p><code>primary(L1) category Id</code></p>',
    )
    shippingRegions: Optional[List[str]] = Field(
        None,
        description='A list of shipping region enumeration values on which the service metric is measured. This comma delimited array allows the seller to customize the report to focus on domestic or international shipping. <p> <span class="tablenote"><strong>Note: </strong>Pass this attribute to narrow down your filter results for the <code>ITEM_NOT_RECEIVED</code> customerServiceMetricType.</span></p> <p>Supported categories include:</p><p><code>primary(L1) category Id</code></p>See <strong>ShippingRegionTypeEnum</strong> for values',
    )


class DateRange(BaseModel):
    """
    The type that defines the fields for a date range.
    """

    from_: Optional[str] = Field(
        None,
        alias="from",
        description="The beginning date in the range. If the parent type is included, both the <strong>from</strong> and/or the <strong>to</strong> fields become conditionally required.<br /><br /><b>Format: </b>UTC <code>yyyy-MM-ddThh:mm:ss.SSSZ </code> <br /><br /> <b> For example: </b> Tasks within a range  <br /> <code>yyyy-MM-ddThh:mm:ss.SSSZ..yyyy-MM-ddThh:mm:ss.SSSZ </code> <br /><br /> Tasks created on March 31, 2021  <br /><code>2021-03-31T00:00:00.000Z..2021-03-31T00:00:00.000Z</code>    ",
    )
    to: Optional[str] = Field(
        None,
        description="The end date for the date range, which is inclusive. If the parent type is included, both the <strong>from</strong> and/or the <strong>to</strong> fields become conditionally required.  <br /><br /> <b> For example: </b> <br /><br />Tasks within a range  <br /> <code>yyyy-MM-ddThh:mm:ss.SSSZ..yyyy-MM-ddThh:mm:ss.SSSZ </code> <br /><br /> Tasks created on March 31, 2021 <br /> <code>2021-03-31T00:00:00.000Z..2021-03-31T00:00:00.000Z</code>  ",
    )


class ErrorParameter(BaseModel):
    name: Optional[str] = Field(None, description="The object of the error.")
    value: Optional[str] = Field(None, description="The value of the object.")


class InventoryFilterCriteria(BaseModel):
    """
    This container is used to set the filter criteria for the ActiveInventoryReport. A seller can create an ActiveInventoryReport for a single listing format.
    """

    listingFormat: Optional[str] = Field(
        None,
        description="The listing format for the ActiveInventoryReport being created. Supported types are:<br><ul><li><code>AUCTION</code></li><li><code>FIXED_PRICE</code></li></ul> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:ListingFormatEnum'>eBay API documentation</a>",
    )


class OrderFilterCriteria(BaseModel):
    """
    The type that defines the fields for the order filters.
    """

    creationDateRange: Optional[DateRange] = Field(
        None,
        description="The creation date range of the orders you want returned. Set the date range so it contains less than 10 days (maximum). If you do not specify a <strong>DateRange</strong>, results from the last 10 days will be returned by default.",
    )
    modifiedDateRange: Optional[DateRange] = Field(
        None,
        description='The modified date range of the orders you want returned. <p> <span class="tablenote"><strong>Note:</strong> This container is for future use. At this time, the <strong>createOrderTask</strong> method only supports order creation date filters and not modified order date filters.</span></p>',
    )
    orderStatus: Optional[str] = Field(
        None,
        description="The order status of the orders returned. If the filter is omitted from createOrderTask call, orders that are in both <code>ACTIVE </code>and<code> COMPLETED</code> states are returned. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:OrderStatusEnum'>eBay API documentation</a>",
    )


class ServiceMetricsTask(BaseModel):
    """
    This type defines customer service metric task response fields.
    """

    completionDate: Optional[str] = Field(
        None,
        description="The timestamp when the customer service metrics task went into the <code>COMPLETED</code> or <code>COMPLETED_WITH_ERROR</code> state. This field is only returned if the status is one of the two completed values. This state means that eBay has compiled the report for the seller based on the seller’s filter criteria, and the seller can run a <strong>getResultFile</strong> call to download the report.",
    )
    creationDate: Optional[str] = Field(
        None, description="The date the customer service metrics task was created."
    )
    detailHref: Optional[str] = Field(
        None,
        description="The relative <strong>getCustomerServiceMetricTask</strong> call URI path to retrieve the corresponding task.",
    )
    feedType: Optional[str] = Field(
        None, description="The feed type associated with the task."
    )
    filterCriteria: Optional[CustomerServiceMetricsFilterCriteria] = Field(
        None, description="This container shows the criteria set for the report."
    )
    schemaVersion: Optional[str] = Field(
        None,
        description="The schema version number of the file format. If omitted, the default value is used. <p><b>Default value: </b><code>1.0</code><p>",
    )
    status: Optional[str] = Field(
        None,
        description="An enumeration value that indicates the state of the task. See <strong>FeedStatusEnum</strong> for values. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:FeedStatusEnum'>eBay API documentation</a>",
    )
    taskId: Optional[str] = Field(
        None, description="The unique eBay-assigned ID of the task."
    )


class StreamingOutput(BaseModel):
    """
    File stream
    """


class SupportedConfiguration(BaseModel):
    """
    An array that defines the configuration supported by this template. This includes specified properties and usage (whether the property is REQUIRED or OPTIONAL), and an optional default value.
    """

    defaultValue: Optional[str] = Field(
        None,
        description="The default value for the property. If a value is omitted from the schedule and a default value is supplied, the default value is used.",
    )
    property: Optional[str] = Field(
        None,
        description="Properties supported by the template. Properties can include the following: <ul><li><b>scheduleStartDate:</b> The timestamp that the report generation (subscription) begins. After this timestamp, the schedule status becomes active until either the scheduleEndDate occurs or the scheduleTemplate becomes inactive. Format: UTC <code>yyyy-MM-dd<strong>T</strong>HH<strong>Z</strong></code></li><li><b>scheduleEndDate:</b> The timestamp that the report generation (subscription) ends. After this date, the schedule status becomes INACTIVE. Format: UTC <code>yyyy-MM-dd<strong>T</strong>HH<strong>Z</strong></code></li><li><b>schemaVersion:</b> The schema version of the schedule templates feedType. This field is required if the feedType has a schema version.</li><li><b>preferredTriggerDayOfMonth:</b> The preferred day of the month to trigger the schedule. </li><li><b>preferredTriggerDayOfWeek:</b> The preferred day of the week to trigger the schedule. </li><li><b>preferredTriggerHour:</b> The preferred two-digit hour of the day to trigger the schedule. Format: UTC <code>hhZ</code></li><ul>",
    )
    usage: Optional[str] = Field(
        None,
        description="Whether the specified property is REQUIRED or OPTIONAL. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:ConfigurationsUsageEnum'>eBay API documentation</a>",
    )


class UpdateUserScheduleRequest(BaseModel):
    """
    The type that defines the fields for a schedule update to a schedule generated with the Feed API.
    """

    preferredTriggerDayOfMonth: Optional[int] = Field(
        None,
        description="The preferred day of the month to trigger the schedule. This field can be used with <strong>preferredTriggerHour</strong> for monthly schedules. The last day of the month is used for numbers larger than the actual number of days in the month. <br /><br />This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value. <br /><br /><b>Minimum: </b>1<b><br /><br /><b>Maximum: </b>31",
    )
    preferredTriggerDayOfWeek: Optional[str] = Field(
        None,
        description="The preferred day of the week to trigger the schedule. This field can be used with <strong>preferredTriggerHour</strong> for weekly schedules. <br /><br />This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:DayOfWeekEnum'>eBay API documentation</a>",
    )
    preferredTriggerHour: Optional[str] = Field(
        None,
        description="The preferred two-digit hour of the day to trigger the schedule. <br /><br />This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value. <br /><br /><b>Format:</b> UTC <code>hhZ</code><br /><br />For example, the following represents 11:00 am UTC:<code> 11Z</code><br /><br /><b>Minimum: </b><code>00Z</code><br /><br /><b>Maximum:</b> <code>23Z</code>",
    )
    scheduleEndDate: Optional[str] = Field(
        None,
        description="The timestamp on which the schedule (report generation) ends. After this date, the schedule status becomes <code>INACTIVE</code>. <br /><br />Use this field, if available, to end the schedule in the future. This value must be later than <strong>scheduleStartDate</strong> (if supplied). This field is available as specified by the template (<strong>scheduleTemplateId</strong>). The template can specify this field as optional or required, and optionally provides a default value.<br /><br /><b>Format:</b> UTC <code>yyyy-MM-dd<strong>T</strong>HH<strong>Z</strong></code><br /><br />For example, the following represents UTC October 10, 2021 at 10:00 AM:<br /><code> 2021-10-10T10Z</code>",
    )
    scheduleName: Optional[str] = Field(
        None,
        description="The schedule name assigned by the user for the created schedule.",
    )
    scheduleStartDate: Optional[str] = Field(
        None,
        description="The timestamp to start generating the report. After this timestamp, the schedule status becomes active until either the <strong>scheduleEndDate</strong> occurs or the <strong>scheduleTemplateId</strong> becomes inactive. <br /><br />Use this field, if available, to start the schedule in the future but before the <strong>scheduleEndDate</strong> (if supplied). This field is available as specified by the template <strong>(scheduleTemplateId)</strong>.  The template can specify this field as optional or required, and optionally provides a default value.<br /><br /><b>Format:</b> UTC <code>yyyy-MM-dd<strong>T</strong>HH<strong>Z</strong></code><br /><br />For example, the following represents a schedule start date of UTC October 01, 2020 at 12:00 PM:<br /><code> 2020-01-01T12Z</code>",
    )
    schemaVersion: Optional[str] = Field(
        None, description="The schema version of a schedule."
    )


class UploadSummary(BaseModel):
    """
    This container provides summary information on an upload feed (not applicable for download feed types).
    """

    failureCount: Optional[int] = Field(
        None,
        description="The number of records, such as the number of listings created or the number of pictures uploaded to a listing, that failed to process during the upload feed. Check the response file and correct any issues mentioned. If the feed fails before processing, no response file is provided. In this case check the REST output response.",
    )
    successCount: Optional[int] = Field(
        None,
        description="The number of records that were successfully processed during the upload feed.",
    )


class UserScheduleResponse(BaseModel):
    """
    The type that defines the fields for a paginated result set of available schedules. The response consists of 0 or more sequenced <em> pages</em> where each page has 0 or more items.
    """

    scheduleId: Optional[str] = Field(
        None,
        description="The ID of the schedule. This ID is generated when the schedule was created by the <strong>createSchedule</strong> method.",
    )
    creationDate: Optional[str] = Field(
        None,
        description="The creation date of the schedule in hours based on the 24-hour Coordinated Universal Time (UTC) clock.",
    )
    feedType: Optional[str] = Field(
        None, description="The <strong>feedType</strong> associated with the schedule."
    )
    lastModifiedDate: Optional[str] = Field(
        None, description="The date the schedule was last modified."
    )
    preferredTriggerDayOfMonth: Optional[int] = Field(
        None,
        description="The preferred day of the month to trigger the schedule. This field can be used with <strong>preferredTriggerHour</strong> for monthly schedules. The last day of the month is used for numbers larger than the number of days in the month.",
    )
    preferredTriggerDayOfWeek: Optional[str] = Field(
        None,
        description="The preferred day of the week to trigger the schedule. This field can be used with <strong>preferredTriggerHour</strong> for weekly schedules. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:DayOfWeekEnum'>eBay API documentation</a>",
    )
    preferredTriggerHour: Optional[str] = Field(
        None,
        description="The preferred two-digit hour of the day to trigger the schedule. <br /><br /><b>Format:</b> UTC <code>hhZ</code><br /><br />For example, the following represents 11:00 am UTC:<br /><br /><code>11Z</code><br /><br />",
    )
    scheduleEndDate: Optional[str] = Field(
        None,
        description="The timestamp on which the report generation (subscription) ends. After this date, the schedule status becomes <code>INACTIVE</code>.",
    )
    scheduleName: Optional[str] = Field(
        None,
        description="The schedule name assigned by the user for the created schedule. Users assign this name for their reference.",
    )
    scheduleStartDate: Optional[str] = Field(
        None,
        description="The timestamp that indicates the start of the report generation.",
    )
    scheduleTemplateId: Optional[str] = Field(
        None, description="The ID of the template used to create this schedule."
    )
    schemaVersion: Optional[str] = Field(
        None, description="The schema version of the feedType for the schedule."
    )
    status: Optional[str] = Field(
        None,
        description="The enumeration value that indicates the state of the schedule. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:StatusEnum'>eBay API documentation</a>",
    )
    statusReason: Optional[str] = Field(
        None,
        description="The reason the schedule is inactive. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:StatusReasonEnum'>eBay API documentation</a>",
    )


class CreateInventoryTaskRequest(BaseModel):
    """
    This type defines inventory-related download task request fields.
    """

    feedType: Optional[str] = Field(
        None,
        description='The feed type associated with the inventory task you are about to create. Presently, only one feed type is available:<br><ul><li><code>LMS_ACTIVE_INVENTORY_REPORT</code></li></ul>See <a href="/api-docs/sell/static/feed/lms-feeds-quick-reference.html#merchant-data-reports-download-feed-types" target="_blank">Report download feed types</a> for more information.',
    )
    filterCriteria: Optional[InventoryFilterCriteria] = Field(
        None,
        description="This container allows a seller to create an ActiveInventoryReport for a single listing format.",
    )
    schemaVersion: Optional[str] = Field(
        None,
        description='The version number of the inventory task to use for the <b>feedType</b>.<br><br><span class="tablenote"><b>Note:</b> This field <b>must</b> have a value of <code>1.0</code>.</span>',
    )


class CreateOrderTaskRequest(BaseModel):
    """
    The type that defines the fields for the <b> createOrderTask</b> request.
    """

    feedType: Optional[str] = Field(
        None,
        description='The feed type associated with the task. The only presently supported value is <code>LMS_ORDER_REPORT</code>.<br><br>See <a href="/api-docs/sell/static/feed/lms-feeds-quick-reference.html#merchant-data-reports-download-feed-types" target="_blank">Report download feed types</a> for more information.',
    )
    filterCriteria: Optional[OrderFilterCriteria] = Field(
        None,
        description="The container for the filter fields. This container is used to set the filter criteria for the order report. A seller can set date range filters and/or can retrieve orders in a specific state.",
    )
    schemaVersion: Optional[str] = Field(
        None,
        description="The schema version of the LMS OrderReport. For the <code>LMS_ORDER_REPORT</code> feed type, see the <a href=\"/devzone/merchant-data/CallRef/OrderReport.html#OrderReport\">OrderReport</a> reference page to see the present schema version. The <b> schemaVersion</b> value is the version number shown at the top of the <b> OrderReport</b> page. <br /><br /><b>Restriction: </b> This value must be 1113 or higher. The OrderReport schema version is updated about every two weeks. All version numbers are odd numbers (even numbers are skipped). For example, the next release version after '1113' is '1115'.",
    )


class CreateServiceMetricsTaskRequest(BaseModel):
    """
    The type that defines the fields for the Customer Service Metric reports generated with the Feed API.
    """

    feedType: Optional[str] = Field(
        None,
        description="The <strong>feedType</strong> specified for the customer service metric task being created. The report lists the transaction details that contribute to the service metrics evaluation. Supported types include:<p><code>CUSTOMER_SERVICE_METRICS_REPORT</code></p>",
    )
    filterCriteria: Optional[CustomerServiceMetricsFilterCriteria] = Field(
        None,
        description="This container is used to customize and set criteria for Customer Service Metric report that will be associated with the task.",
    )
    schemaVersion: Optional[str] = Field(
        None,
        description='The version number of the customer service metric.<br><br><span class="tablenote"><b>Note:</b> This field <b>must</b> have a value of <code>1.0</code>.</span>',
    )


class CustomerServiceMetricTaskCollection(BaseModel):
    """
    This type defines customer service metric task response fields.
    """

    href: Optional[str] = Field(
        None, description="The URI of the current page of results."
    )
    limit: Optional[int] = Field(
        None,
        description='The value of the <strong>limit</strong> parameter submitted in the request, which is the maximum number of tasks to return per page, from the result set. A result set is the complete set of tasks returned by the method. <p> <span class="tablenote"><strong>Note:</strong> Even though this parameter is not required to be submitted in the request, the parameter defaults to 10 if omitted.</span></p><p> <span class="tablenote"><strong>Note:</strong> If this is the last or only page of the result set, the page may contain fewer tasks than the limit value. To determine the number of pages in a result set, divide the total value (total number of tasks matching input criteria) by this limit value, and then round up to the next integer. For example, if the <strong>total</strong> value was <code>120</code> (120 total tasks) and the <strong>limit</strong> value was <code>50</code> (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate <strong>getCustomerServiceMetricTasks</strong> calls to view all tasks matching the input criteria.</span></p>',
    )
    next: Optional[str] = Field(
        None,
        description="The relative path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set.",
    )
    offset: Optional[int] = Field(
        None,
        description='The number of results skipped in the result set before returning the first result. This value can be set in the request with the <b>offset</b> query parameter. <p class="tablenote"><strong>Note: </strong>The items in a paginated result set use a zero-based list where the first item in the list has an offset of <code>0</code>.</p>',
    )
    prev: Optional[str] = Field(
        None,
        description="The URI for the previous page of results. This parameter is returned if a previous page of results from the result set exists.",
    )
    tasks: Optional[List[ServiceMetricsTask]] = Field(
        None,
        description="An array of the customer service tasks on this page. The tasks are sorted by creation date. An empty array is returned if the filter criteria excludes all tasks.",
    )
    total: Optional[int] = Field(
        None, description="The total number of tasks that match the criteria."
    )


class Error(BaseModel):
    """
    This type defines the fields that can be returned in an error.
    """

    category: Optional[str] = Field(None, description="Identifies the type of erro.")
    domain: Optional[str] = Field(
        None,
        description="Name for the primary system where the error occurred. This is relevant for application errors.",
    )
    errorId: Optional[int] = Field(
        None, description="A unique number to identify the error."
    )
    inputRefIds: Optional[List[str]] = Field(
        None,
        description="An array of request elements most closely associated to the error.",
    )
    longMessage: Optional[str] = Field(
        None, description="A more detailed explanation of the error."
    )
    message: Optional[str] = Field(
        None,
        description="Information on how to correct the problem, in the end user's terms and language where applicable.",
    )
    outputRefIds: Optional[List[str]] = Field(
        None,
        description="An array of request elements most closely associated to the error.",
    )
    parameters: Optional[List[ErrorParameter]] = Field(
        None,
        description="An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.",
    )
    subdomain: Optional[str] = Field(
        None,
        description="Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.",
    )


class InventoryTask(BaseModel):
    taskId: Optional[str] = Field(
        None,
        description="The ID of the task. This ID is generated when the task was created by the <strong>createInventoryTask</strong> method.",
    )
    status: Optional[str] = Field(
        None,
        description="The status of the task. Users must wait until status is complete before moving on to the next step (such as uploading/downloading a file). For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:FeedStatusEnum'>eBay API documentation</a>",
    )
    feedType: Optional[str] = Field(
        None, description="The feed type associated with the inventory task."
    )
    creationDate: Optional[str] = Field(
        None, description="The date the task was created."
    )
    completionDate: Optional[str] = Field(
        None,
        description="The timestamp when the task <strong>status</strong> went into the <code>COMPLETED</code>, <code>COMPLETED_WITH_ERROR</code>, or <code>PARTIALLY_PROCESSED</code> state. This field is only returned if the status is one of the three completed values.",
    )
    schemaVersion: Optional[str] = Field(
        None, description="The schema version number associated with the task."
    )
    detailHref: Optional[str] = Field(
        None,
        description="The path to the call URI used to retrieve the task. This field points to the <strong>getInventoryTask</strong> URI.",
    )
    uploadSummary: Optional[UploadSummary] = Field(
        None,
        description="This container provides summary information on an upload feed (not applicable for download feed types).",
    )
    filterCriteria: Optional[InventoryFilterCriteria] = Field(
        None,
        description="This container is used to set the filter criteria for the ActiveInventoryReport. A seller can retrieve listings for a specified format.",
    )


class InventoryTaskCollection(BaseModel):
    href: Optional[str] = Field(
        None,
        description="The path to the call URI that produced the current page of results.",
    )
    limit: Optional[int] = Field(
        None,
        description='The value of the <strong>limit</strong> parameter submitted in the request, which is the maximum number of inventory tasks to return per page, from the result set. A result set is the complete set of tasks returned by the method.<br /><br /><span class="tablenote"><strong>Note:</strong> Though this parameter is not required to be submitted in the request, the parameter defaults to <code>10</code> if omitted. Additionally, if this is the last or only page of the result set, the page may contain fewer tasks than the <strong>limit</strong> value submitted in the request.</span><br /><br />To determine the number of pages in a result set, divide the total value (total number of tasks matching the input criteria) by this limit value, and then round up to the next integer. For example, if the <strong>total</strong> value was <code>120</code> (120 total tasks) and the <strong>limit</strong> value was <code>50</code> (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate <strong>getInventoryTasks</strong> calls to view all tasks matching the input criteria.',
    )
    next: Optional[str] = Field(
        None,
        description="The path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set.",
    )
    offset: Optional[int] = Field(
        None,
        description='The number of results skipped in the result set before listing the first returned result. This value can be specified in the request with the <strong>offset</strong> query parameter.<br /><br /><span class="tablenote"><strong>Note:</strong> The items in a paginated result set use a zero-based list, where the first item in the list has an offset of <code>0</code>.</span>',
    )
    prev: Optional[str] = Field(
        None,
        description="The path to the call URI for the previous page of results. This is returned if there is a previous page of results from the result set.",
    )
    tasks: Optional[List[InventoryTask]] = Field(
        None,
        description='An array of the inventory tasks on this page. The tasks are sorted by creation date.<br /><br /><span class="tablenote"><strong>Note:</strong> An empty array is returned if the filter criteria excludes all tasks.</span>',
    )
    total: Optional[int] = Field(
        None,
        description="The total number of inventory tasks that match the input criteria.",
    )


class OrderTask(BaseModel):
    """
    The type that defines the fields for the <b> getOrderTask</b> response.
    """

    completionDate: Optional[str] = Field(
        None,
        description="The timestamp when the task went into the <code>COMPLETED</code> or <code>COMPLETED_WITH_ERROR</code> state. This state means that eBay has compiled the report for the seller based on the seller’s filter criteria, and the seller can run a <strong>getResultFile</strong> call to download the report.",
    )
    creationDate: Optional[str] = Field(
        None, description="The date the task was created."
    )
    detailHref: Optional[str] = Field(
        None, description="The path to the call URI used to retrieve the task."
    )
    feedType: Optional[str] = Field(
        None, description="The feed type associated with the task."
    )
    filterCriteria: Optional[OrderFilterCriteria] = Field(
        None, description="A container that returns the filter criteria used."
    )
    schemaVersion: Optional[str] = Field(
        None, description="The schema version number associated with the create task."
    )
    status: Optional[str] = Field(
        None,
        description="The enumeration value that indicates the state of the task that was submitted in the request. See <strong>FeedStatusEnum</strong> for information. <p>The values <code>COMPLETED </code>and<code> COMPLETED_WITH_ERROR</code> indicate the Order Report file is ready to download.</p> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:FeedStatusEnum'>eBay API documentation</a>",
    )
    taskId: Optional[str] = Field(
        None, description="The ID of the task that was submitted in the request."
    )
    uploadSummary: Optional[UploadSummary] = Field(
        None,
        description="This container provides summary information on an upload feed (not applicable for download feed types).",
    )


class OrderTaskCollection(BaseModel):
    """
    The type that defines the fields for a paginated result set of orders. The response consists of 0 or more sequenced <em> pages</em> where each page has 0 or more items.
    """

    href: Optional[str] = Field(
        None,
        description="The path to the call URI that produced the current page of results.",
    )
    limit: Optional[int] = Field(
        None,
        description='The value of the <strong>limit</strong> parameter submitted in the request, which is the maximum number of order tasks to return per page, from the result set. A result set is the complete set of tasks returned by the method. <p> <span class="tablenote"><strong>Note:</strong> Though this parameter is not required to be submitted in the request, the parameter defaults to <code>10</code> if omitted.</span></p><p> <span class="tablenote"><strong>Note:</strong> If this is the last or only page of the result set, the page may contain fewer tasks than the <strong>limit</strong> value. To determine the number of pages in a result set, divide the total value (total number of tasks matching input criteria) by this limit value, and then round up to the next integer. For example, if the <strong>total</strong> value was <code>120</code> (120 total tasks) and the <strong>limit</strong> value was <code>50</code> (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate <strong>getOrderTasks</strong> calls to view all tasks matching the input criteria.</span></p>',
    )
    next: Optional[str] = Field(
        None,
        description="The path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set.",
    )
    offset: Optional[int] = Field(
        None,
        description='The number of results skipped in the result set before listing the first returned result. This value can be set in the request with the <b>offset</b> query parameter. <p class="tablenote"><strong>Note: </strong>The items in a paginated result set use a zero-based list where the first item in the list has an offset of <code>0</code>.</p>',
    )
    prev: Optional[str] = Field(
        None,
        description="The path to the call URI for the previous page of results. This is returned if there is a previous page of results from the result set.",
    )
    tasks: Optional[List[OrderTask]] = Field(
        None,
        description="An array of the order tasks on this page. The tasks are sorted by creation date. An empty array is returned if the filter criteria excludes all tasks.",
    )
    total: Optional[int] = Field(
        None,
        description="The total number of order tasks that match the input criteria.",
    )


class ScheduleTemplateResponse(BaseModel):
    """
    The type that defines the fields for a paginated result set of available schedule templates. The response consists of 0 or more sequenced <em> pages</em> where each page has 0 or more items.
    """

    feedType: Optional[str] = Field(
        None,
        description='The feed type of the schedule template. <p> <span class="tablenote"><strong>Note:</strong> When calling <strong>createSchedule</strong> and <strong>updateSchedule</strong> methods you must match the feed type specified by the schedule template (this feedType).</span></p>',
    )
    frequency: Optional[str] = Field(
        None,
        description="This field specifies how often the schedule is generated. If set to <code>HALF_HOUR</code> or <code>ONE_HOUR</code>, you cannot set a <strong>preferredTriggerHour</strong> using <strong>createSchedule</strong> or <strong>updateSchedule</strong>. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:FrequencyEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None, description="The template name provided by the template."
    )
    scheduleTemplateId: Optional[str] = Field(
        None,
        description="The ID of the template. Use this ID to create a schedule based on the properties of this schedule template.",
    )
    status: Optional[str] = Field(
        None,
        description="The present status of the template. You cannot create or modify a schedule using a template with an <code>INACTIVE</code> status.  For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:StatusEnum'>eBay API documentation</a>",
    )
    supportedConfigurations: Optional[List[SupportedConfiguration]] = Field(
        None, description="An array of the configuration supported by this template."
    )


class Task(BaseModel):
    """
    The type that defines the fields for the task details.
    """

    completionDate: Optional[str] = Field(
        None,
        description="The timestamp when the task went into the <code>COMPLETED</code> or <code>COMPLETED_WITH_ERROR</code> state. This state means that eBay has compiled the report for the seller based on the seller’s filter criteria, and the seller can run a <strong>getResultFile</strong> call to download the report.",
    )
    creationDate: Optional[str] = Field(
        None, description="The date the task was created."
    )
    detailHref: Optional[str] = Field(
        None,
        description="The path to the call URI used to retrieve the task. This field points to the GetOrderTask URI if the task is for <code>LMS_ORDER_REPORT</code> or will be null if this task is for <code>LMS_ORDER_ACK</code>.",
    )
    feedType: Optional[str] = Field(
        None, description="The feed type associated with the task."
    )
    schemaVersion: Optional[str] = Field(
        None, description="The schema version number associated with the task."
    )
    status: Optional[str] = Field(
        None,
        description="The enumeration value that indicates the state of the task that was submitted in the request. See <strong>FeedStatusEnum</strong> for information. <p>The values <code>COMPLETED </code>and<code> COMPLETED_WITH_ERROR</code> indicate the Order Report file is ready to download.</p> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/feed/types/api:FeedStatusEnum'>eBay API documentation</a>",
    )
    taskId: Optional[str] = Field(
        None, description="The ID of the task that was submitted in the request."
    )
    uploadSummary: Optional[UploadSummary] = Field(
        None,
        description="This container provides summary information on an upload feed (not applicable for download feed types).",
    )


class TaskCollection(BaseModel):
    """
    The type that defines the fields for a paginated result set of tasks. The response consists of 0 or more sequenced <em> pages</em> where each page has 0 or more items.
    """

    href: Optional[str] = Field(
        None,
        description="The path to the call URI that produced the current page of results. ",
    )
    limit: Optional[int] = Field(
        None,
        description='The value of the <strong>limit</strong> parameter submitted in the request, which is the maximum number of tasks to return per page, from the result set. A result set is the complete set of tasks returned by the method. <p> <span class="tablenote"><strong>Note:</strong> Though this parameter is not required to be submitted in the request, the parameter defaults to 10 if omitted.</span></p><p> <span class="tablenote"><strong>Note:</strong> If this is the last or only page of the result set, the page may contain fewer tasks than the <strong>limit</strong> value. To determine the number of pages in a result set, divide the total value (total number of tasks matching input criteria) by this limit value, and then round up to the next integer. For example, if the <strong>total</strong> value was <code>120</code> (120 total tasks) and the <strong>limit</strong> value was <code>50</code> (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate <strong>getTasks</strong> calls to view all tasks matching the input criteria.</span></p>',
    )
    next: Optional[str] = Field(
        None,
        description="The path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set.",
    )
    offset: Optional[int] = Field(
        None,
        description='The number of results skipped in the result set before listing the first returned result. This value can be set in the request with the <b>offset</b> query parameter. <p class="tablenote"><strong>Note: </strong>The items in a paginated result set use a zero-based list where the first item in the list has an offset of <code>0</code>.</p>',
    )
    prev: Optional[str] = Field(
        None,
        description="The path to the call URI for the previous page of results. This is returned if there is a previous page of results from the result set.",
    )
    tasks: Optional[List[Task]] = Field(
        None,
        description="An array of the tasks on this page. The tasks are sorted by creation date. An empty array is returned if the filter criteria excludes all tasks. ",
    )
    total: Optional[int] = Field(
        None, description="The total number of tasks that match the input criteria."
    )


class UserScheduleCollection(BaseModel):
    """
    The type that defines the fields for a paginated result set of user schedules. The response consists of 0 or more sequenced <em> pages</em> where each page has 0 or more items.
    """

    href: Optional[str] = Field(
        None,
        description="The path to the call URI that produced the current page of results.",
    )
    limit: Optional[int] = Field(
        None,
        description='The value of the <strong>limit</strong> parameter submitted in the request, which is the maximum number of schedules to return per page, from the result set. A result set is the complete set of schedules returned by the method. <p> <span class="tablenote"><strong>Note:</strong> Though this parameter is not required to be submitted in the request, the parameter defaults to 10 if omitted.<p> <span class="tablenote"><strong>Note:</strong> If this is the last or only page of the result set, the page may contain fewer tasks than the <strong>limit</strong> value. To determine the number of pages in a result set, divide the total value (total number of tasks matching input criteria) by this limit value, and then round up to the next integer. For example, if the <strong>total</strong> value was <code>120</code> (120 total tasks) and the <strong>limit</strong> value was <code>50</code> (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate <strong>getSchedules</strong> calls to view all tasks matching the input criteria.</span></p></span></p>',
    )
    next: Optional[str] = Field(
        None,
        description="The path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set.",
    )
    offset: Optional[int] = Field(
        None,
        description='The number of results skipped in the result set before listing the first returned result. This value can be set in the request with the <b>offset</b> query parameter. <p class="tablenote"><strong>Note: </strong>The items in a paginated result set use a zero-based list where the first item in the list has an offset of <code>0</code>.</p>',
    )
    prev: Optional[str] = Field(
        None,
        description="The path to the call URI for the previous page of results. This is returned if there is a previous page of results from the result set.",
    )
    schedules: Optional[List[UserScheduleResponse]] = Field(
        None,
        description="An array of the schedules on this page. An empty array is returned if the filter criteria excludes all tasks.",
    )
    total: Optional[int] = Field(
        None, description="The total number of schedules that match the input criteria."
    )


class ScheduleTemplateCollection(BaseModel):
    """
    The type that defines the fields for a paginated result set of schedule templates. The response consists of 0 or more sequenced <em> pages</em> where each page has 0 or more items.
    """

    href: Optional[str] = Field(
        None,
        description="The path to the call URI that produced the current page of results.",
    )
    limit: Optional[int] = Field(
        None,
        description='The value of the <strong>limit</strong> parameter submitted in the request, which is the maximum number of schedule templates to return per page, from the result set. A result set is the complete set of schedule templates returned by the method. <p> <span class="tablenote"><strong>Note:</strong> Though this parameter is not required to be submitted in the request, the parameter defaults to 10 if omitted.</span></p><p> <span class="tablenote"><strong>Note:</strong> If this is the last or only page of the result set, the page may contain fewer tasks than the <strong>limit</strong> value. To determine the number of pages in a result set, divide the total value (total number of tasks matching input criteria) by this limit value, and then round up to the next integer. For example, if the <strong>total</strong> value was <code>120</code> (120 total tasks) and the <strong>limit</strong> value was <code>50</code> (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate <strong>getScheduleTemplates</strong> calls to view all tasks matching the input criteria.</span></p>',
    )
    next: Optional[str] = Field(
        None,
        description="The path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set.",
    )
    offset: Optional[int] = Field(
        None,
        description='The number of results skipped in the result set before listing the first returned result. This value can be set in the request with the <b>offset</b> query parameter. <p class="tablenote"><strong>Note: </strong>The items in a paginated result set use a zero-based list where the first item in the list has an offset of <code>0</code>.</p>',
    )
    prev: Optional[str] = Field(
        None,
        description="The path to the call URI for the previous page of results. This is returned if there is a previous page of results from the result set.",
    )
    scheduleTemplates: Optional[List[ScheduleTemplateResponse]] = Field(
        None,
        description="An array of the schedule templates on this page. An empty array is returned if the filter criteria excludes all tasks.",
    )
    total: Optional[int] = Field(
        None,
        description="The total number of schedule templates that match the input criteria.",
    )
