/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies the mapping of data property keys. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Mapping implements Serializable, Cloneable, StructuredPojo { /** *
* After the apply mapping, what the name of the column should be. Can be the same as FromPath
.
*
* The table or column to be modified. *
*/ private java.util.List* The type of the data to be modified. *
*/ private String fromType; /** ** The data type that the data is to be modified to. *
*/ private String toType; /** ** If true, then the column is removed. *
*/ private Boolean dropped; /** *
* Only applicable to nested data structures. If you want to change the parent structure, but also one of its
* children, you can fill out this data strucutre. It is also Mapping
, but its FromPath
* will be the parent's FromPath
plus the FromPath
from this structure.
*
* For the children part, suppose you have the structure: *
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* You can specify a Mapping
that looks like:
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* After the apply mapping, what the name of the column should be. Can be the same as FromPath
.
*
FromPath
.
*/
public void setToKey(String toKey) {
this.toKey = toKey;
}
/**
*
* After the apply mapping, what the name of the column should be. Can be the same as FromPath
.
*
FromPath
.
*/
public String getToKey() {
return this.toKey;
}
/**
*
* After the apply mapping, what the name of the column should be. Can be the same as FromPath
.
*
FromPath
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Mapping withToKey(String toKey) {
setToKey(toKey);
return this;
}
/**
* * The table or column to be modified. *
* * @return The table or column to be modified. */ public java.util.List* The table or column to be modified. *
* * @param fromPath * The table or column to be modified. */ public void setFromPath(java.util.Collection* The table or column to be modified. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setFromPath(java.util.Collection)} or {@link #withFromPath(java.util.Collection)} if you want to override * the existing values. *
* * @param fromPath * The table or column to be modified. * @return Returns a reference to this object so that method calls can be chained together. */ public Mapping withFromPath(String... fromPath) { if (this.fromPath == null) { setFromPath(new java.util.ArrayList* The table or column to be modified. *
* * @param fromPath * The table or column to be modified. * @return Returns a reference to this object so that method calls can be chained together. */ public Mapping withFromPath(java.util.Collection* The type of the data to be modified. *
* * @param fromType * The type of the data to be modified. */ public void setFromType(String fromType) { this.fromType = fromType; } /** ** The type of the data to be modified. *
* * @return The type of the data to be modified. */ public String getFromType() { return this.fromType; } /** ** The type of the data to be modified. *
* * @param fromType * The type of the data to be modified. * @return Returns a reference to this object so that method calls can be chained together. */ public Mapping withFromType(String fromType) { setFromType(fromType); return this; } /** ** The data type that the data is to be modified to. *
* * @param toType * The data type that the data is to be modified to. */ public void setToType(String toType) { this.toType = toType; } /** ** The data type that the data is to be modified to. *
* * @return The data type that the data is to be modified to. */ public String getToType() { return this.toType; } /** ** The data type that the data is to be modified to. *
* * @param toType * The data type that the data is to be modified to. * @return Returns a reference to this object so that method calls can be chained together. */ public Mapping withToType(String toType) { setToType(toType); return this; } /** ** If true, then the column is removed. *
* * @param dropped * If true, then the column is removed. */ public void setDropped(Boolean dropped) { this.dropped = dropped; } /** ** If true, then the column is removed. *
* * @return If true, then the column is removed. */ public Boolean getDropped() { return this.dropped; } /** ** If true, then the column is removed. *
* * @param dropped * If true, then the column is removed. * @return Returns a reference to this object so that method calls can be chained together. */ public Mapping withDropped(Boolean dropped) { setDropped(dropped); return this; } /** ** If true, then the column is removed. *
* * @return If true, then the column is removed. */ public Boolean isDropped() { return this.dropped; } /** *
* Only applicable to nested data structures. If you want to change the parent structure, but also one of its
* children, you can fill out this data strucutre. It is also Mapping
, but its FromPath
* will be the parent's FromPath
plus the FromPath
from this structure.
*
* For the children part, suppose you have the structure: *
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* You can specify a Mapping
that looks like:
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
Mapping
, but its
* FromPath
will be the parent's FromPath
plus the FromPath
from this
* structure.
* * For the children part, suppose you have the structure: *
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* You can specify a Mapping
that looks like:
*
*
* Only applicable to nested data structures. If you want to change the parent structure, but also one of its
* children, you can fill out this data strucutre. It is also
* For the children part, suppose you have the structure:
*
*
* You can specify a
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*/
public java.util.ListMapping
, but its FromPath
* will be the parent's FromPath
plus the FromPath
from this structure.
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* Mapping
that looks like:
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* Mapping
, but its
* FromPath
will be the parent's FromPath
plus the FromPath
from this
* structure.
* For the children part, suppose you have the structure: *
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* You can specify a Mapping
that looks like:
*
*
* Only applicable to nested data structures. If you want to change the parent structure, but also one of its
* children, you can fill out this data strucutre. It is also
* For the children part, suppose you have the structure:
*
*
* You can specify a
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setChildren(java.util.Collection)} or {@link #withChildren(java.util.Collection)} if you want to override
* the existing values.
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*/
public void setChildren(java.util.CollectionMapping
, but its FromPath
* will be the parent's FromPath
plus the FromPath
from this structure.
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* Mapping
that looks like:
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* Mapping
, but its
* FromPath
will be the parent's FromPath
plus the FromPath
from this
* structure.
* For the children part, suppose you have the structure: *
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* You can specify a Mapping
that looks like:
*
*
* Only applicable to nested data structures. If you want to change the parent structure, but also one of its
* children, you can fill out this data strucutre. It is also
* For the children part, suppose you have the structure:
*
*
* You can specify a
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Mapping withChildren(Mapping... children) {
if (this.children == null) {
setChildren(new java.util.ArrayListMapping
, but its FromPath
* will be the parent's FromPath
plus the FromPath
from this structure.
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* Mapping
that looks like:
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* Mapping
, but its
* FromPath
will be the parent's FromPath
plus the FromPath
from this
* structure.
* For the children part, suppose you have the structure: *
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
*
* You can specify a Mapping
that looks like:
*
* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Mapping withChildren(java.util.Collection