org.openmetadata.schema.services.connections.messaging.KinesisConnection Maven / Gradle / Ivy
package org.openmetadata.schema.services.connections.messaging;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openmetadata.schema.security.credentials.AWSCredentials;
/**
* KinesisConnection
*
* Kinesis Connection Config
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"awsConfig",
"supportsMetadataExtraction"
})
@Generated("jsonschema2pojo")
public class KinesisConnection {
/**
* Service type.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Service type.")
private KinesisConnection.KinesisType type = KinesisConnection.KinesisType.fromValue("Kinesis");
/**
* AWSCredentials
*
* AWS credentials configs.
* (Required)
*
*/
@JsonProperty("awsConfig")
@JsonPropertyDescription("AWS credentials configs.")
@Valid
@NotNull
private AWSCredentials awsConfig;
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
@JsonPropertyDescription("Supports Metadata Extraction.")
private Boolean supportsMetadataExtraction = true;
/**
* Service type.
*
*/
@JsonProperty("type")
public KinesisConnection.KinesisType getType() {
return type;
}
/**
* Service type.
*
*/
@JsonProperty("type")
public void setType(KinesisConnection.KinesisType type) {
this.type = type;
}
public KinesisConnection withType(KinesisConnection.KinesisType type) {
this.type = type;
return this;
}
/**
* AWSCredentials
*
* AWS credentials configs.
* (Required)
*
*/
@JsonProperty("awsConfig")
public AWSCredentials getAwsConfig() {
return awsConfig;
}
/**
* AWSCredentials
*
* AWS credentials configs.
* (Required)
*
*/
@JsonProperty("awsConfig")
public void setAwsConfig(AWSCredentials awsConfig) {
this.awsConfig = awsConfig;
}
public KinesisConnection withAwsConfig(AWSCredentials awsConfig) {
this.awsConfig = awsConfig;
return this;
}
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
public Boolean getSupportsMetadataExtraction() {
return supportsMetadataExtraction;
}
/**
* Supports Metadata Extraction.
*
*/
@JsonProperty("supportsMetadataExtraction")
public void setSupportsMetadataExtraction(Boolean supportsMetadataExtraction) {
this.supportsMetadataExtraction = supportsMetadataExtraction;
}
public KinesisConnection withSupportsMetadataExtraction(Boolean supportsMetadataExtraction) {
this.supportsMetadataExtraction = supportsMetadataExtraction;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(KinesisConnection.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("type");
sb.append('=');
sb.append(((this.type == null)?"":this.type));
sb.append(',');
sb.append("awsConfig");
sb.append('=');
sb.append(((this.awsConfig == null)?"":this.awsConfig));
sb.append(',');
sb.append("supportsMetadataExtraction");
sb.append('=');
sb.append(((this.supportsMetadataExtraction == null)?"":this.supportsMetadataExtraction));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.supportsMetadataExtraction == null)? 0 :this.supportsMetadataExtraction.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.awsConfig == null)? 0 :this.awsConfig.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof KinesisConnection) == false) {
return false;
}
KinesisConnection rhs = ((KinesisConnection) other);
return ((((this.supportsMetadataExtraction == rhs.supportsMetadataExtraction)||((this.supportsMetadataExtraction!= null)&&this.supportsMetadataExtraction.equals(rhs.supportsMetadataExtraction)))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.awsConfig == rhs.awsConfig)||((this.awsConfig!= null)&&this.awsConfig.equals(rhs.awsConfig))));
}
/**
* Service type.
*
*/
@Generated("jsonschema2pojo")
public enum KinesisType {
KINESIS("Kinesis");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (KinesisConnection.KinesisType c: values()) {
CONSTANTS.put(c.value, c);
}
}
KinesisType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static KinesisConnection.KinesisType fromValue(String value) {
KinesisConnection.KinesisType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}