All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.platform.client.IgsConnectMode Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.platform.client;

import cz.proto.ingestion.Ingestion;
import cz.proto.ingestion.v2.IngestionV2;

public enum IgsConnectMode {
  UNKNOWN,
  DIRECT,
  GATEWAY,
  GATEWAY_INTERNAL,
  GATEWAY_DIRECT,

  // new router mode.
  ROUTER_DIRECT,
  ROUTER_GATEWAY;

  public static Ingestion.ConnectMode toIngestionConnectMode(IgsConnectMode igsConnectMode) {
    switch (igsConnectMode) {
      case DIRECT: return Ingestion.ConnectMode.DIRECT;
      case GATEWAY: return Ingestion.ConnectMode.GATEWAY;
      case GATEWAY_INTERNAL: return Ingestion.ConnectMode.GATEWAY_INTERNAL;
      case GATEWAY_DIRECT: return Ingestion.ConnectMode.GATEWAY_DIRECT;
      case UNKNOWN:
      default:
        throw new UnsupportedOperationException("to ingestion connect mode failed with " + igsConnectMode);
    }
  }

  public static IngestionV2.ConnectMode toIngestionConnectModeV2(IgsConnectMode igsConnectMode) {
    switch (igsConnectMode) {
      case DIRECT: return IngestionV2.ConnectMode.DIRECT;
      case GATEWAY: return IngestionV2.ConnectMode.GATEWAY;
      case GATEWAY_INTERNAL: return IngestionV2.ConnectMode.GATEWAY_INTERNAL;
      case GATEWAY_DIRECT: return IngestionV2.ConnectMode.GATEWAY_DIRECT;
      case UNKNOWN:
      default:
        throw new UnsupportedOperationException("to ingestion connect mode failed with " + igsConnectMode);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy