com.amazonaws.services.kinesisfirehose.model.Deserializer Maven / Gradle / Ivy
Show all versions of aws-java-sdk-kinesis Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.kinesisfirehose.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The deserializer you want Firehose to use for converting the input data from JSON. Firehose then serializes the data
* to its final format using the Serializer. Firehose supports two types of deserializers: the Apache Hive JSON
* SerDe and the OpenX JSON SerDe.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Deserializer implements Serializable, Cloneable, StructuredPojo {
/**
*
* The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format in
* preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose,
* depending on which one offers the functionality you need. The other option is the native Hive / HCatalog
* JsonSerDe.
*
*/
private OpenXJsonSerDe openXJsonSerDe;
/**
*
* The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it from the
* JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you
* can choose, depending on which one offers the functionality you need. The other option is the OpenX SerDe.
*
*/
private HiveJsonSerDe hiveJsonSerDe;
/**
*
* The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format in
* preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose,
* depending on which one offers the functionality you need. The other option is the native Hive / HCatalog
* JsonSerDe.
*
*
* @param openXJsonSerDe
* The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format
* in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can
* choose, depending on which one offers the functionality you need. The other option is the native Hive /
* HCatalog JsonSerDe.
*/
public void setOpenXJsonSerDe(OpenXJsonSerDe openXJsonSerDe) {
this.openXJsonSerDe = openXJsonSerDe;
}
/**
*
* The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format in
* preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose,
* depending on which one offers the functionality you need. The other option is the native Hive / HCatalog
* JsonSerDe.
*
*
* @return The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format
* in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can
* choose, depending on which one offers the functionality you need. The other option is the native Hive /
* HCatalog JsonSerDe.
*/
public OpenXJsonSerDe getOpenXJsonSerDe() {
return this.openXJsonSerDe;
}
/**
*
* The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format in
* preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose,
* depending on which one offers the functionality you need. The other option is the native Hive / HCatalog
* JsonSerDe.
*
*
* @param openXJsonSerDe
* The OpenX SerDe. Used by Firehose for deserializing data, which means converting it from the JSON format
* in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can
* choose, depending on which one offers the functionality you need. The other option is the native Hive /
* HCatalog JsonSerDe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Deserializer withOpenXJsonSerDe(OpenXJsonSerDe openXJsonSerDe) {
setOpenXJsonSerDe(openXJsonSerDe);
return this;
}
/**
*
* The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it from the
* JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you
* can choose, depending on which one offers the functionality you need. The other option is the OpenX SerDe.
*
*
* @param hiveJsonSerDe
* The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it
* from the JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two
* deserializers you can choose, depending on which one offers the functionality you need. The other option
* is the OpenX SerDe.
*/
public void setHiveJsonSerDe(HiveJsonSerDe hiveJsonSerDe) {
this.hiveJsonSerDe = hiveJsonSerDe;
}
/**
*
* The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it from the
* JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you
* can choose, depending on which one offers the functionality you need. The other option is the OpenX SerDe.
*
*
* @return The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it
* from the JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two
* deserializers you can choose, depending on which one offers the functionality you need. The other option
* is the OpenX SerDe.
*/
public HiveJsonSerDe getHiveJsonSerDe() {
return this.hiveJsonSerDe;
}
/**
*
* The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it from the
* JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you
* can choose, depending on which one offers the functionality you need. The other option is the OpenX SerDe.
*
*
* @param hiveJsonSerDe
* The native Hive / HCatalog JsonSerDe. Used by Firehose for deserializing data, which means converting it
* from the JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two
* deserializers you can choose, depending on which one offers the functionality you need. The other option
* is the OpenX SerDe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Deserializer withHiveJsonSerDe(HiveJsonSerDe hiveJsonSerDe) {
setHiveJsonSerDe(hiveJsonSerDe);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getOpenXJsonSerDe() != null)
sb.append("OpenXJsonSerDe: ").append(getOpenXJsonSerDe()).append(",");
if (getHiveJsonSerDe() != null)
sb.append("HiveJsonSerDe: ").append(getHiveJsonSerDe());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Deserializer == false)
return false;
Deserializer other = (Deserializer) obj;
if (other.getOpenXJsonSerDe() == null ^ this.getOpenXJsonSerDe() == null)
return false;
if (other.getOpenXJsonSerDe() != null && other.getOpenXJsonSerDe().equals(this.getOpenXJsonSerDe()) == false)
return false;
if (other.getHiveJsonSerDe() == null ^ this.getHiveJsonSerDe() == null)
return false;
if (other.getHiveJsonSerDe() != null && other.getHiveJsonSerDe().equals(this.getHiveJsonSerDe()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOpenXJsonSerDe() == null) ? 0 : getOpenXJsonSerDe().hashCode());
hashCode = prime * hashCode + ((getHiveJsonSerDe() == null) ? 0 : getHiveJsonSerDe().hashCode());
return hashCode;
}
@Override
public Deserializer clone() {
try {
return (Deserializer) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.kinesisfirehose.model.transform.DeserializerMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}