code: def fromexportreg(cls, bundle, export_reg):
          # type: (Bundle, ExportRegistration) -> RemoteServiceAdminEvent
          
          exc = export_reg.get_exception()
          if exc:
              return RemoteServiceAdminEvent(
                  RemoteServiceAdminEvent.EXPORT_ERROR,
                  bundle,
                  export_reg.get_export_container_id(),
                  export_reg.get_remoteservice_id(),
                  None,
                  None,
                  exc,
                  export_reg.get_description(),
              )
  
          return RemoteServiceAdminEvent(
              RemoteServiceAdminEvent.EXPORT_REGISTRATION,
              bundle,
              export_reg.get_export_container_id(),
              export_reg.get_remoteservice_id(),
              None,
              export_reg.get_export_reference(),
              None,
              export_reg.get_description(),
          )
docs: Creates a RemoteServiceAdminEvent object from an ExportRegistration