Source code for nisystemlink.clients.product.models._product_request

from typing import Dict, List

from nisystemlink.clients.core._uplink._json_model import JsonModel


class BaseProductRequest(JsonModel):
    """Contains information about a product."""

    name: str | None = None
    """The name of the product.

    Usually the name is used to refer to several part numbers that all have the same name but
    different revisions or versions.
    """

    family: str | None = None
    """The family that that this product belongs to.

    Usually the family is a grouping above product name. A family usually has multiple product
    names within it.
    """

    file_ids: List[str] | None = None
    """A list of file ids that are attached to this product."""

    keywords: List[str] | None = None
    """A list of keywords that categorize this product."""

    properties: Dict[str, str] | None = None
    """A list of custom properties for this product."""

    workspace: str | None = None
    """The id of the workspace that this product belongs to."""


[docs]class CreateProductRequest(BaseProductRequest): part_number: str """The part number is the unique identifier of a product within a single org. Usually the part number refers to a specific revision or version of a given product."""
[docs]class UpdateProductRequest(BaseProductRequest): """This is the request model to update a product.""" id: str """The globally unique id of the product."""