com.clickzetta.platform.client.IgsConnectMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
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