com.airbyte.api.models.shared.DestinationMssqlSSHTunnelMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
SDK enabling Java developers to easily integrate with the Airbyte API.
The newest version!
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
package com.airbyte.api.models.shared;
import com.airbyte.api.utils.Utils;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.InputStream;
import java.lang.Deprecated;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.OffsetDateTime;
import java.time.LocalDate;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.airbyte.api.utils.TypedObject;
import com.airbyte.api.utils.Utils.JsonShape;
/**
* DestinationMssqlSSHTunnelMethod - Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.
*/
@JsonDeserialize(using = DestinationMssqlSSHTunnelMethod._Deserializer.class)
public class DestinationMssqlSSHTunnelMethod {
@com.fasterxml.jackson.annotation.JsonValue
private TypedObject value;
private DestinationMssqlSSHTunnelMethod(TypedObject value) {
this.value = value;
}
public static DestinationMssqlSSHTunnelMethod of(DestinationMssqlNoTunnel value) {
Utils.checkNotNull(value, "value");
return new DestinationMssqlSSHTunnelMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
}
public static DestinationMssqlSSHTunnelMethod of(DestinationMssqlSSHKeyAuthentication value) {
Utils.checkNotNull(value, "value");
return new DestinationMssqlSSHTunnelMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
}
public static DestinationMssqlSSHTunnelMethod of(DestinationMssqlPasswordAuthentication value) {
Utils.checkNotNull(value, "value");
return new DestinationMssqlSSHTunnelMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
}
/**
* Returns an instance of one of these types:
*
* - {@code DestinationMssqlNoTunnel}
* - {@code DestinationMssqlSSHKeyAuthentication}
* - {@code DestinationMssqlPasswordAuthentication}
*
*
* Use {@code instanceof} to determine what type is returned. For example:
*
*
* if (obj.value() instanceof String) {
* String answer = (String) obj.value();
* System.out.println("answer=" + answer);
* }
*
*
* @return value of oneOf type
**/
public java.lang.Object value() {
return value.value();
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DestinationMssqlSSHTunnelMethod other = (DestinationMssqlSSHTunnelMethod) o;
return java.util.Objects.deepEquals(this.value.value(), other.value.value());
}
@Override
public int hashCode() {
return java.util.Objects.hash(value.value());
}
@SuppressWarnings("serial")
public static final class _Deserializer extends com.airbyte.api.utils.OneOfDeserializer {
public _Deserializer() {
super(DestinationMssqlSSHTunnelMethod.class,
Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT),
Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT),
Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(DestinationMssqlSSHTunnelMethod.class,
"value", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy