fromMap static method

ComponentObjectsData? fromMap(
  1. Object? body
)

Implementation

static ComponentObjectsData? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return ComponentObjectsData(
    accounts: readList<Object>(source['accounts'], readAny),
    attributeGroups: readList<Object>(source['attribute_groups'], readAny),
    attributes: readList<Object>(source['attributes'], readAny),
    code: readText(source['code']),
    component: ComponentObjectsDataComponent.fromMap(source['component']),
    createdBy: readAny(source['created_by']),
    createdOn: readText(source['created_on']),
    customForm: ComponentObjectsDataCustomForm.fromMap(source['custom_form']),
    customObjects: readList<Object>(source['custom_objects'], readAny),
    href: readText(source['href']),
    id: readText(source['id']),
    items: readList<Object>(source['items'], readAny),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readAny(source['last_updated_on']),
    object: readText(source['object']),
    orders: readList<Object>(source['orders'], readAny),
    parents: readList<ComponentObjectsDataParent>(
        source['parents'], ComponentObjectsDataParent.fromMap),
    quotes: readList<Object>(source['quotes'], readAny),
    restrictions: readList<Object>(source['restrictions'], readAny),
    status: readText(source['status']),
    version: readInteger(source['version']),
    workflowData: readList<Object>(source['workflow_data'], readAny),
    workflowStage: readAny(source['workflow_stage']),
    workflowStatus: readAny(source['workflow_status']),
    workflowStatusUuid: readAny(source['workflow_status_uuid']),
  );
}