com.airbyte.api.models.shared.SourceZendeskSunshineAuthorizationMethod 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;
@JsonDeserialize(using = SourceZendeskSunshineAuthorizationMethod._Deserializer.class)
public class SourceZendeskSunshineAuthorizationMethod {
@com.fasterxml.jackson.annotation.JsonValue
private TypedObject value;
private SourceZendeskSunshineAuthorizationMethod(TypedObject value) {
this.value = value;
}
public static SourceZendeskSunshineAuthorizationMethod of(SourceZendeskSunshineOAuth20 value) {
Utils.checkNotNull(value, "value");
return new SourceZendeskSunshineAuthorizationMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
}
public static SourceZendeskSunshineAuthorizationMethod of(SourceZendeskSunshineAPIToken value) {
Utils.checkNotNull(value, "value");
return new SourceZendeskSunshineAuthorizationMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
}
/**
* Returns an instance of one of these types:
*
* - {@code SourceZendeskSunshineOAuth20}
* - {@code SourceZendeskSunshineAPIToken}
*
*
* 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;
}
SourceZendeskSunshineAuthorizationMethod other = (SourceZendeskSunshineAuthorizationMethod) 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(SourceZendeskSunshineAuthorizationMethod.class,
Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT),
Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(SourceZendeskSunshineAuthorizationMethod.class,
"value", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy