class_docstr: An endpoint maps a route and request/response payload to components.
  
  Parameters
  ----------
  route
      The API route name to construct as the servicing POST endpoint.
  inputs
      The full name of a component input. Typically, specified by just passing
      in the component parameter attribute (i.e.``component.inputs.foo``).
  outputs
      The full name of a component output. Typically, specified by just passing
      in the component parameter attribute (i.e.``component.outputs.bar``).
class_docstr_tok: ["An","endpoint","maps","a","route","and","request\/response","payload","to","components",".","Parameters","--","--","--","--","--","route","The","API","route","name","to","construct","as","the","servicing","POST","endpoint",".","inputs","The","full","name","of","a","component","input",".","Typically",",","specified","by","just","passing","in","the","component","parameter","attribute","(","i.e.","``","component.inputs.foo","``",")",".","outputs","The","full","name","of","a","component","output",".","Typically",",","specified","by","just","passing","in","the","component","parameter","attribute","(","i.e.","``","component.outputs.bar","``",")","."]
code: def __post_init__(self):
      if not isinstance(self.route, str):
          raise TypeError(
              f"route parameter must be type={str}, recieved "
              f"route={self.route} of type={type(self.route)}"
          )
      if not self.route.startswith("/"):
          raise ValueError(
              "route must begin with a `slash` character (ie `/`)."
          )
  
      for k in tuple(self.inputs.keys()):
          v = self.inputs[k]
          if not isinstance(v, (Parameter, str)):
              raise TypeError(
                  f"inputs k={k}, v={v}, is not {Parameter} or {str}. type(v)={type(v)}"
              )
          self.inputs[k] = str(v)
  
      for k in tuple(self.outputs.keys()):
          v = self.outputs[k]
          if not isinstance(v, (Parameter, str)):
              raise TypeError(f"k={k}, v={v}, type(v)={type(v)}")
          self.outputs[k] = str(v)
  
imports: import dataclasses
  from dataclasses import dataclass, field, make_dataclass
  from pathlib import Path
  from typing import Dict, Iterator, List, NamedTuple, Optional, Tuple, Type, TypeVar, Union
  import pytorch_lightning
  import torch
  from flash.core.serve.types.base import BaseType
  from flash.core.serve.utils import download_file
  from flash.core.utilities.imports import _PYDANTIC_AVAILABLE, requires
label_desc: Use image node_id 1 for calling the Endpoint obj's underlying member method code with example usage: obj.__post_init__() without return types