Serial2 in Zero used in class object

I found we can use serial2 in pin 10 and 12 from HERE. Thanks to MartinL answer.

But my question is: how can I pass this serial2 in a class object. since my serial data is generated from inside a class object. like this:

// Serial2 pin and pad definitions (in Arduino files Variant.h & Variant.cpp)
#define PIN_SERIAL2_RX       (34ul)               // Pin description number for PIO_SERCOM on D12
#define PIN_SERIAL2_TX       (36ul)               // Pin description number for PIO_SERCOM on D10
#define PAD_SERIAL2_TX       (UART_TX_PAD_2)      // SERCOM pad 2
#define PAD_SERIAL2_RX       (SERCOM_RX_PAD_3)    // SERCOM pad 3

// Instantiate the Serial2 class
Uart Serial2(&sercom1, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);

DataClass data;

void setup()
{
  Serial2.begin(115200);          // Begin Serial2
}

void loop()
{ 

  if(data.avaiable()) {
    data.publish();
  }
}

void SERCOM1_Handler()    // Interrupt handler for SERCOM1
{
  Serial2.IrqHandler();
}


/**====================================================**/

class DataClass:
{
  bool avaiable();

  void publish() {
    serial2.write(data);
  }

private:
  bool avaiable_;
  char data[10];
}

make a class member pointer to hold the serial, add begin method that takes pointer and assigns it to member pointer

always write Serial2, not serial2

Serial ports are best passed around as pointers/references to Stream objects, which means:
Unlike "HardwareSerial" objects, Streams will work with SoftwareSerial or USB-native ports.
Hardware-specific stuff (xxx.begin(), in particular) will need to be done somewhere else, where it knows exactly the type of port being used.

int getc_wait(Stream &S) {
  int c;
  do {
     c = S.read();
  } while (c < 0);
  return c;
}

void setup() {
   Serial.begin(9600);  // initialize HardwareSerial
   Serial.println("type any character to start");
   getc_wait(Serial);
}