/* * 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.timestreamwrite.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Data model for a batch load task. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DataModel implements Serializable, Cloneable, StructuredPojo { /** ** Source column to be mapped to time. *
*/ private String timeColumn; /** *
* The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds,
* or other supported values. Default is MILLISECONDS
.
*
* Source to target mappings for dimensions. *
*/ private java.util.List* Source to target mappings for multi-measure records. *
*/ private MultiMeasureMappings multiMeasureMappings; /** ** Source to target mappings for measures. *
*/ private java.util.List* Source column to be mapped to time. *
* * @param timeColumn * Source column to be mapped to time. */ public void setTimeColumn(String timeColumn) { this.timeColumn = timeColumn; } /** ** Source column to be mapped to time. *
* * @return Source column to be mapped to time. */ public String getTimeColumn() { return this.timeColumn; } /** ** Source column to be mapped to time. *
* * @param timeColumn * Source column to be mapped to time. * @return Returns a reference to this object so that method calls can be chained together. */ public DataModel withTimeColumn(String timeColumn) { setTimeColumn(timeColumn); return this; } /** *
* The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds,
* or other supported values. Default is MILLISECONDS
.
*
MILLISECONDS
.
* @see TimeUnit
*/
public void setTimeUnit(String timeUnit) {
this.timeUnit = timeUnit;
}
/**
*
* The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds,
* or other supported values. Default is MILLISECONDS
.
*
MILLISECONDS
.
* @see TimeUnit
*/
public String getTimeUnit() {
return this.timeUnit;
}
/**
*
* The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds,
* or other supported values. Default is MILLISECONDS
.
*
MILLISECONDS
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TimeUnit
*/
public DataModel withTimeUnit(String timeUnit) {
setTimeUnit(timeUnit);
return this;
}
/**
*
* The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds,
* or other supported values. Default is MILLISECONDS
.
*
MILLISECONDS
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TimeUnit
*/
public DataModel withTimeUnit(TimeUnit timeUnit) {
this.timeUnit = timeUnit.toString();
return this;
}
/**
* * Source to target mappings for dimensions. *
* * @return Source to target mappings for dimensions. */ public java.util.List* Source to target mappings for dimensions. *
* * @param dimensionMappings * Source to target mappings for dimensions. */ public void setDimensionMappings(java.util.Collection* Source to target mappings for dimensions. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDimensionMappings(java.util.Collection)} or {@link #withDimensionMappings(java.util.Collection)} if * you want to override the existing values. *
* * @param dimensionMappings * Source to target mappings for dimensions. * @return Returns a reference to this object so that method calls can be chained together. */ public DataModel withDimensionMappings(DimensionMapping... dimensionMappings) { if (this.dimensionMappings == null) { setDimensionMappings(new java.util.ArrayList* Source to target mappings for dimensions. *
* * @param dimensionMappings * Source to target mappings for dimensions. * @return Returns a reference to this object so that method calls can be chained together. */ public DataModel withDimensionMappings(java.util.Collection* Source to target mappings for multi-measure records. *
* * @param multiMeasureMappings * Source to target mappings for multi-measure records. */ public void setMultiMeasureMappings(MultiMeasureMappings multiMeasureMappings) { this.multiMeasureMappings = multiMeasureMappings; } /** ** Source to target mappings for multi-measure records. *
* * @return Source to target mappings for multi-measure records. */ public MultiMeasureMappings getMultiMeasureMappings() { return this.multiMeasureMappings; } /** ** Source to target mappings for multi-measure records. *
* * @param multiMeasureMappings * Source to target mappings for multi-measure records. * @return Returns a reference to this object so that method calls can be chained together. */ public DataModel withMultiMeasureMappings(MultiMeasureMappings multiMeasureMappings) { setMultiMeasureMappings(multiMeasureMappings); return this; } /** ** Source to target mappings for measures. *
* * @return Source to target mappings for measures. */ public java.util.List* Source to target mappings for measures. *
* * @param mixedMeasureMappings * Source to target mappings for measures. */ public void setMixedMeasureMappings(java.util.Collection* Source to target mappings for measures. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMixedMeasureMappings(java.util.Collection)} or {@link #withMixedMeasureMappings(java.util.Collection)} * if you want to override the existing values. *
* * @param mixedMeasureMappings * Source to target mappings for measures. * @return Returns a reference to this object so that method calls can be chained together. */ public DataModel withMixedMeasureMappings(MixedMeasureMapping... mixedMeasureMappings) { if (this.mixedMeasureMappings == null) { setMixedMeasureMappings(new java.util.ArrayList* Source to target mappings for measures. *
* * @param mixedMeasureMappings * Source to target mappings for measures. * @return Returns a reference to this object so that method calls can be chained together. */ public DataModel withMixedMeasureMappings(java.util.Collection