/* * Copyright 2018-2023 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 OpenX SerDe. Used by Kinesis Data 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. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OpenXJsonSerDe implements Serializable, Cloneable, StructuredPojo { /** *
* When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
* Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
* names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
* when using this option.
*
* The default is false
.
*
* When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
* deserializing them.
*
* Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
* keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
* timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
* ts
.
*
* When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
* Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
* names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
* when using this option.
*
* The default is false
.
*
true
, specifies that the names of the keys include dots and that you want Kinesis
* Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in
* column names. For example, if the JSON contains a key whose name is "a.b", you can define the column name
* to be "a_b" when using this option.
*
* The default is false
.
*/
public void setConvertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores) {
this.convertDotsInJsonKeysToUnderscores = convertDotsInJsonKeysToUnderscores;
}
/**
*
* When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
* Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
* names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
* when using this option.
*
* The default is false
.
*
true
, specifies that the names of the keys include dots and that you want
* Kinesis Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow
* dots in column names. For example, if the JSON contains a key whose name is "a.b", you can define the
* column name to be "a_b" when using this option.
*
* The default is false
.
*/
public Boolean getConvertDotsInJsonKeysToUnderscores() {
return this.convertDotsInJsonKeysToUnderscores;
}
/**
*
* When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
* Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
* names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
* when using this option.
*
* The default is false
.
*
true
, specifies that the names of the keys include dots and that you want Kinesis
* Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in
* column names. For example, if the JSON contains a key whose name is "a.b", you can define the column name
* to be "a_b" when using this option.
*
* The default is false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpenXJsonSerDe withConvertDotsInJsonKeysToUnderscores(Boolean convertDotsInJsonKeysToUnderscores) {
setConvertDotsInJsonKeysToUnderscores(convertDotsInJsonKeysToUnderscores);
return this;
}
/**
*
* When set to true
, specifies that the names of the keys include dots and that you want Kinesis Data
* Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column
* names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b"
* when using this option.
*
* The default is false
.
*
true
, specifies that the names of the keys include dots and that you want
* Kinesis Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow
* dots in column names. For example, if the JSON contains a key whose name is "a.b", you can define the
* column name to be "a_b" when using this option.
*
* The default is false
.
*/
public Boolean isConvertDotsInJsonKeysToUnderscores() {
return this.convertDotsInJsonKeysToUnderscores;
}
/**
*
* When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
* deserializing them.
*
true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase
* before deserializing them.
*/
public void setCaseInsensitive(Boolean caseInsensitive) {
this.caseInsensitive = caseInsensitive;
}
/**
*
* When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
* deserializing them.
*
true
, which is the default, Kinesis Data Firehose converts JSON keys to
* lowercase before deserializing them.
*/
public Boolean getCaseInsensitive() {
return this.caseInsensitive;
}
/**
*
* When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
* deserializing them.
*
true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase
* before deserializing them.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpenXJsonSerDe withCaseInsensitive(Boolean caseInsensitive) {
setCaseInsensitive(caseInsensitive);
return this;
}
/**
*
* When set to true
, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before
* deserializing them.
*
true
, which is the default, Kinesis Data Firehose converts JSON keys to
* lowercase before deserializing them.
*/
public Boolean isCaseInsensitive() {
return this.caseInsensitive;
}
/**
*
* Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
* keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
* timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
* ts
.
*
timestamp
is a Hive keyword. If you have
* a JSON key named timestamp
, set this parameter to {"ts": "timestamp"}
to map
* this key to a column named ts
.
*/
public java.util.Map
* Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
* keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
* timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
* ts
.
*
timestamp
is a Hive keyword. If you have a
* JSON key named timestamp
, set this parameter to {"ts": "timestamp"}
to map this
* key to a column named ts
.
*/
public void setColumnToJsonKeyMappings(java.util.Map
* Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains
* keys that are Hive keywords. For example, timestamp
is a Hive keyword. If you have a JSON key named
* timestamp
, set this parameter to {"ts": "timestamp"}
to map this key to a column named
* ts
.
*
timestamp
is a Hive keyword. If you have a
* JSON key named timestamp
, set this parameter to {"ts": "timestamp"}
to map this
* key to a column named ts
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpenXJsonSerDe withColumnToJsonKeyMappings(java.util.Map