Skip to content

Attachments

albert.resources.attachments

AttachmentCategory

Bases: str, Enum

Attributes:

Name Type Description
OTHER
SDS
LABEL
SCRIPT

OTHER

OTHER = 'Other'

SDS

SDS = 'SDS'

LABEL

LABEL = 'Label'

SCRIPT

SCRIPT = 'Script'

AttachmentMetadata

Bases: BaseAlbertModel

Show JSON schema:
{
  "$defs": {
    "EntityLinkWithName": {
      "description": "EntityLink that includes the name field in serialization.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Category"
        }
      },
      "required": [
        "id"
      ],
      "title": "EntityLinkWithName",
      "type": "object"
    },
    "HazardStatement": {
      "description": "Model representing a hazard statement.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Category"
        }
      },
      "required": [
        "id"
      ],
      "title": "HazardStatement",
      "type": "object"
    },
    "HazardSymbol": {
      "description": "Model representing a hazard symbol.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Category"
        },
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/Status"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "id"
      ],
      "title": "HazardSymbol",
      "type": "object"
    },
    "Status": {
      "description": "The status of a resource",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "properties": {
    "Symbols": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/HazardSymbol"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Symbols"
    },
    "unNumber": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Unnumber"
    },
    "storageClass": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Storageclass"
    },
    "storageClassName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Storageclassname"
    },
    "hazardStatement": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/HazardStatement"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Hazardstatement"
    },
    "jurisdiction": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Jurisdiction"
    },
    "language": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Language"
    },
    "jurisdictionCode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Jurisdictioncode"
    },
    "languageCode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Languagecode"
    },
    "wgk": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Wgk"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Description"
    },
    "extensions": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/EntityLinkWithName"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Extensions"
    }
  },
  "title": "AttachmentMetadata",
  "type": "object"
}

Fields:

symbols

symbols: list[HazardSymbol] | None = None

un_number

un_number: str | None = None

storage_class

storage_class: str | None = None

storage_class_name

storage_class_name: str | None = None

hazard_statement

hazard_statement: list[HazardStatement] | None = None

jurisdiction

jurisdiction: str | None = None

language

language: str | None = None

jurisdiction_code

jurisdiction_code: str | None = None

language_code

language_code: str | None = None

wgk

wgk: str | None = None

description

description: str | None = None

extensions

extensions: list[EntityLinkWithName] | None = None

Attachment

Bases: BaseResource

Used for attching files to Notes on Tasks, Projects, Inventory, etc. Key should match File.name

Attributes:

Name Type Description
id AttachmentId | None
parent_id str
name str
key str
namespace str
category AttachmentCategory | None
revision_date date | None
file_size int | None
mime_type str | None
signed_url str | None
signed_url_v2 str | None
metadata AttachmentMetadata | None

id

id: AttachmentId | None = Field(
    default=None, alias="albertId"
)

parent_id

parent_id: str = Field(..., alias='parentId')

name

name: str

key

key: str

namespace

namespace: str = Field(default='result', alias='nameSpace')

category

category: AttachmentCategory | None = None

revision_date

revision_date: date | None = Field(
    default=None, alias="revisionDate"
)

file_size

file_size: int | None = Field(
    default=None,
    alias="fileSize",
    exclude=True,
    frozen=True,
)

mime_type

mime_type: str | None = Field(
    default=None,
    alias="mimeType",
    exclude=True,
    frozen=True,
)

signed_url

signed_url: str | None = Field(
    default=None,
    alias="signedURL",
    exclude=True,
    frozen=True,
)

signed_url_v2

signed_url_v2: str | None = Field(
    default=None,
    alias="signedURLV2",
    exclude=True,
    frozen=True,
)

metadata

metadata: AttachmentMetadata | None = Field(
    default=None, alias="Metadata"
)