Class Column.Builder
java.lang.Object
software.amazon.awscdk.services.redshift.alpha.Column.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Column>
- Enclosing interface:
Column
@Stability(Experimental)
public static final class Column.Builder
extends Object
implements software.amazon.jsii.Builder<Column>
A builder for
Column
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofColumn.getComment()
Sets the value ofColumn.getDataType()
Sets the value ofColumn.getDistKey()
encoding
(ColumnEncoding encoding) Sets the value ofColumn.getEncoding()
Sets the value ofColumn.getId()
Sets the value ofColumn.getName()
Sets the value ofColumn.getSortKey()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dataType
Sets the value ofColumn.getDataType()
- Parameters:
dataType
- The data type of the column. This parameter is required.- Returns:
this
-
name
Sets the value ofColumn.getName()
- Parameters:
name
- The name of the column. This parameter is required. This will appear on Amazon Redshift.- Returns:
this
-
comment
Sets the value ofColumn.getComment()
- Parameters:
comment
- A comment to attach to the column.- Returns:
this
-
distKey
Sets the value ofColumn.getDistKey()
- Parameters:
distKey
- Boolean value that indicates whether the column is to be configured as DISTKEY.- Returns:
this
-
encoding
Sets the value ofColumn.getEncoding()
- Parameters:
encoding
- The encoding to use for the column.- Returns:
this
-
id
Sets the value ofColumn.getId()
- Parameters:
id
- The unique identifier of the column. This is not the name of the column, and renaming this identifier will cause a new column to be created and the old column to be dropped.NOTE - This field will be set, however, only by setting the
@aws-cdk/aws-redshift:columnId
feature flag will this field be used.- Returns:
this
-
sortKey
Sets the value ofColumn.getSortKey()
- Parameters:
sortKey
- Boolean value that indicates whether the column is to be configured as SORTKEY.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Column>
- Returns:
- a new instance of
Column
- Throws:
NullPointerException
- if any required attribute was not provided
-