parameters;
private final String createdBy;
private final Boolean isRegisteredWithLakeFormation;
private final TableIdentifier targetTable;
private final String catalogId;
private final String versionId;
private Table(BuilderImpl builder) {
this.name = builder.name;
this.databaseName = builder.databaseName;
this.description = builder.description;
this.owner = builder.owner;
this.createTime = builder.createTime;
this.updateTime = builder.updateTime;
this.lastAccessTime = builder.lastAccessTime;
this.lastAnalyzedTime = builder.lastAnalyzedTime;
this.retention = builder.retention;
this.storageDescriptor = builder.storageDescriptor;
this.partitionKeys = builder.partitionKeys;
this.viewOriginalText = builder.viewOriginalText;
this.viewExpandedText = builder.viewExpandedText;
this.tableType = builder.tableType;
this.parameters = builder.parameters;
this.createdBy = builder.createdBy;
this.isRegisteredWithLakeFormation = builder.isRegisteredWithLakeFormation;
this.targetTable = builder.targetTable;
this.catalogId = builder.catalogId;
this.versionId = builder.versionId;
}
/**
*
* The table name. For Hive compatibility, this must be entirely lowercase.
*
*
* @return The table name. For Hive compatibility, this must be entirely lowercase.
*/
public final String name() {
return name;
}
/**
*
* The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.
*
*
* @return The name of the database where the table metadata resides. For Hive compatibility, this must be all
* lowercase.
*/
public final String databaseName() {
return databaseName;
}
/**
*
* A description of the table.
*
*
* @return A description of the table.
*/
public final String description() {
return description;
}
/**
*
* The owner of the table.
*
*
* @return The owner of the table.
*/
public final String owner() {
return owner;
}
/**
*
* The time when the table definition was created in the Data Catalog.
*
*
* @return The time when the table definition was created in the Data Catalog.
*/
public final Instant createTime() {
return createTime;
}
/**
*
* The last time that the table was updated.
*
*
* @return The last time that the table was updated.
*/
public final Instant updateTime() {
return updateTime;
}
/**
*
* The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
*
*
* @return The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
*/
public final Instant lastAccessTime() {
return lastAccessTime;
}
/**
*
* The last time that column statistics were computed for this table.
*
*
* @return The last time that column statistics were computed for this table.
*/
public final Instant lastAnalyzedTime() {
return lastAnalyzedTime;
}
/**
*
* The retention time for this table.
*
*
* @return The retention time for this table.
*/
public final Integer retention() {
return retention;
}
/**
*
* A storage descriptor containing information about the physical storage of this table.
*
*
* @return A storage descriptor containing information about the physical storage of this table.
*/
public final StorageDescriptor storageDescriptor() {
return storageDescriptor;
}
/**
* For responses, this returns true if the service returned a value for the PartitionKeys property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasPartitionKeys() {
return partitionKeys != null && !(partitionKeys instanceof SdkAutoConstructList);
}
/**
*
* A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
*
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you must at
* least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasPartitionKeys} method.
*
*
* @return A list of columns by which the table is partitioned. Only primitive types are supported as partition
* keys.
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you
* must at least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
*/
public final List partitionKeys() {
return partitionKeys;
}
/**
*
* If the table is a view, the original text of the view; otherwise null
.
*
*
* @return If the table is a view, the original text of the view; otherwise null
.
*/
public final String viewOriginalText() {
return viewOriginalText;
}
/**
*
* If the table is a view, the expanded text of the view; otherwise null
.
*
*
* @return If the table is a view, the expanded text of the view; otherwise null
.
*/
public final String viewExpandedText() {
return viewExpandedText;
}
/**
*
* The type of this table (EXTERNAL_TABLE
, VIRTUAL_VIEW
, etc.).
*
*
* @return The type of this table (EXTERNAL_TABLE
, VIRTUAL_VIEW
, etc.).
*/
public final String tableType() {
return tableType;
}
/**
* For responses, this returns true if the service returned a value for the Parameters property. This DOES NOT check
* that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is
* useful because the SDK will never return a null collection or map, but you may need to differentiate between the
* service returning nothing (or null) and the service returning an empty collection or map. For requests, this
* returns true if a value for the property was specified in the request builder, and false if a value was not
* specified.
*/
public final boolean hasParameters() {
return parameters != null && !(parameters instanceof SdkAutoConstructMap);
}
/**
*
* These key-value pairs define properties associated with the table.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasParameters} method.
*
*
* @return These key-value pairs define properties associated with the table.
*/
public final Map parameters() {
return parameters;
}
/**
*
* The person or entity who created the table.
*
*
* @return The person or entity who created the table.
*/
public final String createdBy() {
return createdBy;
}
/**
*
* Indicates whether the table has been registered with Lake Formation.
*
*
* @return Indicates whether the table has been registered with Lake Formation.
*/
public final Boolean isRegisteredWithLakeFormation() {
return isRegisteredWithLakeFormation;
}
/**
*
* A TableIdentifier
structure that describes a target table for resource linking.
*
*
* @return A TableIdentifier
structure that describes a target table for resource linking.
*/
public final TableIdentifier targetTable() {
return targetTable;
}
/**
*
* The ID of the Data Catalog in which the table resides.
*
*
* @return The ID of the Data Catalog in which the table resides.
*/
public final String catalogId() {
return catalogId;
}
/**
*
* The ID of the table version.
*
*
* @return The ID of the table version.
*/
public final String versionId() {
return versionId;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(databaseName());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(owner());
hashCode = 31 * hashCode + Objects.hashCode(createTime());
hashCode = 31 * hashCode + Objects.hashCode(updateTime());
hashCode = 31 * hashCode + Objects.hashCode(lastAccessTime());
hashCode = 31 * hashCode + Objects.hashCode(lastAnalyzedTime());
hashCode = 31 * hashCode + Objects.hashCode(retention());
hashCode = 31 * hashCode + Objects.hashCode(storageDescriptor());
hashCode = 31 * hashCode + Objects.hashCode(hasPartitionKeys() ? partitionKeys() : null);
hashCode = 31 * hashCode + Objects.hashCode(viewOriginalText());
hashCode = 31 * hashCode + Objects.hashCode(viewExpandedText());
hashCode = 31 * hashCode + Objects.hashCode(tableType());
hashCode = 31 * hashCode + Objects.hashCode(hasParameters() ? parameters() : null);
hashCode = 31 * hashCode + Objects.hashCode(createdBy());
hashCode = 31 * hashCode + Objects.hashCode(isRegisteredWithLakeFormation());
hashCode = 31 * hashCode + Objects.hashCode(targetTable());
hashCode = 31 * hashCode + Objects.hashCode(catalogId());
hashCode = 31 * hashCode + Objects.hashCode(versionId());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof Table)) {
return false;
}
Table other = (Table) obj;
return Objects.equals(name(), other.name()) && Objects.equals(databaseName(), other.databaseName())
&& Objects.equals(description(), other.description()) && Objects.equals(owner(), other.owner())
&& Objects.equals(createTime(), other.createTime()) && Objects.equals(updateTime(), other.updateTime())
&& Objects.equals(lastAccessTime(), other.lastAccessTime())
&& Objects.equals(lastAnalyzedTime(), other.lastAnalyzedTime()) && Objects.equals(retention(), other.retention())
&& Objects.equals(storageDescriptor(), other.storageDescriptor())
&& hasPartitionKeys() == other.hasPartitionKeys() && Objects.equals(partitionKeys(), other.partitionKeys())
&& Objects.equals(viewOriginalText(), other.viewOriginalText())
&& Objects.equals(viewExpandedText(), other.viewExpandedText()) && Objects.equals(tableType(), other.tableType())
&& hasParameters() == other.hasParameters() && Objects.equals(parameters(), other.parameters())
&& Objects.equals(createdBy(), other.createdBy())
&& Objects.equals(isRegisteredWithLakeFormation(), other.isRegisteredWithLakeFormation())
&& Objects.equals(targetTable(), other.targetTable()) && Objects.equals(catalogId(), other.catalogId())
&& Objects.equals(versionId(), other.versionId());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("Table").add("Name", name()).add("DatabaseName", databaseName())
.add("Description", description()).add("Owner", owner()).add("CreateTime", createTime())
.add("UpdateTime", updateTime()).add("LastAccessTime", lastAccessTime())
.add("LastAnalyzedTime", lastAnalyzedTime()).add("Retention", retention())
.add("StorageDescriptor", storageDescriptor()).add("PartitionKeys", hasPartitionKeys() ? partitionKeys() : null)
.add("ViewOriginalText", viewOriginalText()).add("ViewExpandedText", viewExpandedText())
.add("TableType", tableType()).add("Parameters", hasParameters() ? parameters() : null)
.add("CreatedBy", createdBy()).add("IsRegisteredWithLakeFormation", isRegisteredWithLakeFormation())
.add("TargetTable", targetTable()).add("CatalogId", catalogId()).add("VersionId", versionId()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Name":
return Optional.ofNullable(clazz.cast(name()));
case "DatabaseName":
return Optional.ofNullable(clazz.cast(databaseName()));
case "Description":
return Optional.ofNullable(clazz.cast(description()));
case "Owner":
return Optional.ofNullable(clazz.cast(owner()));
case "CreateTime":
return Optional.ofNullable(clazz.cast(createTime()));
case "UpdateTime":
return Optional.ofNullable(clazz.cast(updateTime()));
case "LastAccessTime":
return Optional.ofNullable(clazz.cast(lastAccessTime()));
case "LastAnalyzedTime":
return Optional.ofNullable(clazz.cast(lastAnalyzedTime()));
case "Retention":
return Optional.ofNullable(clazz.cast(retention()));
case "StorageDescriptor":
return Optional.ofNullable(clazz.cast(storageDescriptor()));
case "PartitionKeys":
return Optional.ofNullable(clazz.cast(partitionKeys()));
case "ViewOriginalText":
return Optional.ofNullable(clazz.cast(viewOriginalText()));
case "ViewExpandedText":
return Optional.ofNullable(clazz.cast(viewExpandedText()));
case "TableType":
return Optional.ofNullable(clazz.cast(tableType()));
case "Parameters":
return Optional.ofNullable(clazz.cast(parameters()));
case "CreatedBy":
return Optional.ofNullable(clazz.cast(createdBy()));
case "IsRegisteredWithLakeFormation":
return Optional.ofNullable(clazz.cast(isRegisteredWithLakeFormation()));
case "TargetTable":
return Optional.ofNullable(clazz.cast(targetTable()));
case "CatalogId":
return Optional.ofNullable(clazz.cast(catalogId()));
case "VersionId":
return Optional.ofNullable(clazz.cast(versionId()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((Table) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* The table name. For Hive compatibility, this must be entirely lowercase.
*
*
* @param name
* The table name. For Hive compatibility, this must be entirely lowercase.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The name of the database where the table metadata resides. For Hive compatibility, this must be all
* lowercase.
*
*
* @param databaseName
* The name of the database where the table metadata resides. For Hive compatibility, this must be all
* lowercase.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder databaseName(String databaseName);
/**
*
* A description of the table.
*
*
* @param description
* A description of the table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder description(String description);
/**
*
* The owner of the table.
*
*
* @param owner
* The owner of the table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder owner(String owner);
/**
*
* The time when the table definition was created in the Data Catalog.
*
*
* @param createTime
* The time when the table definition was created in the Data Catalog.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createTime(Instant createTime);
/**
*
* The last time that the table was updated.
*
*
* @param updateTime
* The last time that the table was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder updateTime(Instant updateTime);
/**
*
* The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
*
*
* @param lastAccessTime
* The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lastAccessTime(Instant lastAccessTime);
/**
*
* The last time that column statistics were computed for this table.
*
*
* @param lastAnalyzedTime
* The last time that column statistics were computed for this table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lastAnalyzedTime(Instant lastAnalyzedTime);
/**
*
* The retention time for this table.
*
*
* @param retention
* The retention time for this table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder retention(Integer retention);
/**
*
* A storage descriptor containing information about the physical storage of this table.
*
*
* @param storageDescriptor
* A storage descriptor containing information about the physical storage of this table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder storageDescriptor(StorageDescriptor storageDescriptor);
/**
*
* A storage descriptor containing information about the physical storage of this table.
*
* This is a convenience method that creates an instance of the {@link StorageDescriptor.Builder} avoiding the
* need to create one manually via {@link StorageDescriptor#builder()}.
*
*
* When the {@link Consumer} completes, {@link StorageDescriptor.Builder#build()} is called immediately and its
* result is passed to {@link #storageDescriptor(StorageDescriptor)}.
*
* @param storageDescriptor
* a consumer that will call methods on {@link StorageDescriptor.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #storageDescriptor(StorageDescriptor)
*/
default Builder storageDescriptor(Consumer storageDescriptor) {
return storageDescriptor(StorageDescriptor.builder().applyMutation(storageDescriptor).build());
}
/**
*
* A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
*
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you
* must at least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
*
*
* @param partitionKeys
* A list of columns by which the table is partitioned. Only primitive types are supported as partition
* keys.
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
,
* you must at least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder partitionKeys(Collection partitionKeys);
/**
*
* A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
*
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you
* must at least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
*
*
* @param partitionKeys
* A list of columns by which the table is partitioned. Only primitive types are supported as partition
* keys.
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
,
* you must at least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder partitionKeys(Column... partitionKeys);
/**
*
* A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
*
*
* When you create a table used by Amazon Athena, and you do not specify any partitionKeys
, you
* must at least set the value of partitionKeys
to an empty list. For example:
*
*
* "PartitionKeys": []
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.glue.model.Column.Builder} avoiding the need to create one manually
* via {@link software.amazon.awssdk.services.glue.model.Column#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.glue.model.Column.Builder#build()} is called immediately and its
* result is passed to {@link #partitionKeys(List)}.
*
* @param partitionKeys
* a consumer that will call methods on {@link software.amazon.awssdk.services.glue.model.Column.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #partitionKeys(java.util.Collection)
*/
Builder partitionKeys(Consumer... partitionKeys);
/**
*
* If the table is a view, the original text of the view; otherwise null
.
*
*
* @param viewOriginalText
* If the table is a view, the original text of the view; otherwise null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder viewOriginalText(String viewOriginalText);
/**
*
* If the table is a view, the expanded text of the view; otherwise null
.
*
*
* @param viewExpandedText
* If the table is a view, the expanded text of the view; otherwise null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder viewExpandedText(String viewExpandedText);
/**
*
* The type of this table (EXTERNAL_TABLE
, VIRTUAL_VIEW
, etc.).
*
*
* @param tableType
* The type of this table (EXTERNAL_TABLE
, VIRTUAL_VIEW
, etc.).
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tableType(String tableType);
/**
*
* These key-value pairs define properties associated with the table.
*
*
* @param parameters
* These key-value pairs define properties associated with the table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder parameters(Map parameters);
/**
*
* The person or entity who created the table.
*
*
* @param createdBy
* The person or entity who created the table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createdBy(String createdBy);
/**
*
* Indicates whether the table has been registered with Lake Formation.
*
*
* @param isRegisteredWithLakeFormation
* Indicates whether the table has been registered with Lake Formation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder isRegisteredWithLakeFormation(Boolean isRegisteredWithLakeFormation);
/**
*
* A TableIdentifier
structure that describes a target table for resource linking.
*
*
* @param targetTable
* A TableIdentifier
structure that describes a target table for resource linking.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder targetTable(TableIdentifier targetTable);
/**
*
* A TableIdentifier
structure that describes a target table for resource linking.
*
* This is a convenience method that creates an instance of the {@link TableIdentifier.Builder} avoiding the
* need to create one manually via {@link TableIdentifier#builder()}.
*
*
* When the {@link Consumer} completes, {@link TableIdentifier.Builder#build()} is called immediately and its
* result is passed to {@link #targetTable(TableIdentifier)}.
*
* @param targetTable
* a consumer that will call methods on {@link TableIdentifier.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #targetTable(TableIdentifier)
*/
default Builder targetTable(Consumer targetTable) {
return targetTable(TableIdentifier.builder().applyMutation(targetTable).build());
}
/**
*
* The ID of the Data Catalog in which the table resides.
*
*
* @param catalogId
* The ID of the Data Catalog in which the table resides.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder catalogId(String catalogId);
/**
*
* The ID of the table version.
*
*
* @param versionId
* The ID of the table version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder versionId(String versionId);
}
static final class BuilderImpl implements Builder {
private String name;
private String databaseName;
private String description;
private String owner;
private Instant createTime;
private Instant updateTime;
private Instant lastAccessTime;
private Instant lastAnalyzedTime;
private Integer retention;
private StorageDescriptor storageDescriptor;
private List partitionKeys = DefaultSdkAutoConstructList.getInstance();
private String viewOriginalText;
private String viewExpandedText;
private String tableType;
private Map parameters = DefaultSdkAutoConstructMap.getInstance();
private String createdBy;
private Boolean isRegisteredWithLakeFormation;
private TableIdentifier targetTable;
private String catalogId;
private String versionId;
private BuilderImpl() {
}
private BuilderImpl(Table model) {
name(model.name);
databaseName(model.databaseName);
description(model.description);
owner(model.owner);
createTime(model.createTime);
updateTime(model.updateTime);
lastAccessTime(model.lastAccessTime);
lastAnalyzedTime(model.lastAnalyzedTime);
retention(model.retention);
storageDescriptor(model.storageDescriptor);
partitionKeys(model.partitionKeys);
viewOriginalText(model.viewOriginalText);
viewExpandedText(model.viewExpandedText);
tableType(model.tableType);
parameters(model.parameters);
createdBy(model.createdBy);
isRegisteredWithLakeFormation(model.isRegisteredWithLakeFormation);
targetTable(model.targetTable);
catalogId(model.catalogId);
versionId(model.versionId);
}
public final String getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final String getDatabaseName() {
return databaseName;
}
public final void setDatabaseName(String databaseName) {
this.databaseName = databaseName;
}
@Override
public final Builder databaseName(String databaseName) {
this.databaseName = databaseName;
return this;
}
public final String getDescription() {
return description;
}
public final void setDescription(String description) {
this.description = description;
}
@Override
public final Builder description(String description) {
this.description = description;
return this;
}
public final String getOwner() {
return owner;
}
public final void setOwner(String owner) {
this.owner = owner;
}
@Override
public final Builder owner(String owner) {
this.owner = owner;
return this;
}
public final Instant getCreateTime() {
return createTime;
}
public final void setCreateTime(Instant createTime) {
this.createTime = createTime;
}
@Override
public final Builder createTime(Instant createTime) {
this.createTime = createTime;
return this;
}
public final Instant getUpdateTime() {
return updateTime;
}
public final void setUpdateTime(Instant updateTime) {
this.updateTime = updateTime;
}
@Override
public final Builder updateTime(Instant updateTime) {
this.updateTime = updateTime;
return this;
}
public final Instant getLastAccessTime() {
return lastAccessTime;
}
public final void setLastAccessTime(Instant lastAccessTime) {
this.lastAccessTime = lastAccessTime;
}
@Override
public final Builder lastAccessTime(Instant lastAccessTime) {
this.lastAccessTime = lastAccessTime;
return this;
}
public final Instant getLastAnalyzedTime() {
return lastAnalyzedTime;
}
public final void setLastAnalyzedTime(Instant lastAnalyzedTime) {
this.lastAnalyzedTime = lastAnalyzedTime;
}
@Override
public final Builder lastAnalyzedTime(Instant lastAnalyzedTime) {
this.lastAnalyzedTime = lastAnalyzedTime;
return this;
}
public final Integer getRetention() {
return retention;
}
public final void setRetention(Integer retention) {
this.retention = retention;
}
@Override
public final Builder retention(Integer retention) {
this.retention = retention;
return this;
}
public final StorageDescriptor.Builder getStorageDescriptor() {
return storageDescriptor != null ? storageDescriptor.toBuilder() : null;
}
public final void setStorageDescriptor(StorageDescriptor.BuilderImpl storageDescriptor) {
this.storageDescriptor = storageDescriptor != null ? storageDescriptor.build() : null;
}
@Override
public final Builder storageDescriptor(StorageDescriptor storageDescriptor) {
this.storageDescriptor = storageDescriptor;
return this;
}
public final List getPartitionKeys() {
List result = ColumnListCopier.copyToBuilder(this.partitionKeys);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setPartitionKeys(Collection partitionKeys) {
this.partitionKeys = ColumnListCopier.copyFromBuilder(partitionKeys);
}
@Override
public final Builder partitionKeys(Collection partitionKeys) {
this.partitionKeys = ColumnListCopier.copy(partitionKeys);
return this;
}
@Override
@SafeVarargs
public final Builder partitionKeys(Column... partitionKeys) {
partitionKeys(Arrays.asList(partitionKeys));
return this;
}
@Override
@SafeVarargs
public final Builder partitionKeys(Consumer... partitionKeys) {
partitionKeys(Stream.of(partitionKeys).map(c -> Column.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final String getViewOriginalText() {
return viewOriginalText;
}
public final void setViewOriginalText(String viewOriginalText) {
this.viewOriginalText = viewOriginalText;
}
@Override
public final Builder viewOriginalText(String viewOriginalText) {
this.viewOriginalText = viewOriginalText;
return this;
}
public final String getViewExpandedText() {
return viewExpandedText;
}
public final void setViewExpandedText(String viewExpandedText) {
this.viewExpandedText = viewExpandedText;
}
@Override
public final Builder viewExpandedText(String viewExpandedText) {
this.viewExpandedText = viewExpandedText;
return this;
}
public final String getTableType() {
return tableType;
}
public final void setTableType(String tableType) {
this.tableType = tableType;
}
@Override
public final Builder tableType(String tableType) {
this.tableType = tableType;
return this;
}
public final Map getParameters() {
if (parameters instanceof SdkAutoConstructMap) {
return null;
}
return parameters;
}
public final void setParameters(Map parameters) {
this.parameters = ParametersMapCopier.copy(parameters);
}
@Override
public final Builder parameters(Map parameters) {
this.parameters = ParametersMapCopier.copy(parameters);
return this;
}
public final String getCreatedBy() {
return createdBy;
}
public final void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
@Override
public final Builder createdBy(String createdBy) {
this.createdBy = createdBy;
return this;
}
public final Boolean getIsRegisteredWithLakeFormation() {
return isRegisteredWithLakeFormation;
}
public final void setIsRegisteredWithLakeFormation(Boolean isRegisteredWithLakeFormation) {
this.isRegisteredWithLakeFormation = isRegisteredWithLakeFormation;
}
@Override
public final Builder isRegisteredWithLakeFormation(Boolean isRegisteredWithLakeFormation) {
this.isRegisteredWithLakeFormation = isRegisteredWithLakeFormation;
return this;
}
public final TableIdentifier.Builder getTargetTable() {
return targetTable != null ? targetTable.toBuilder() : null;
}
public final void setTargetTable(TableIdentifier.BuilderImpl targetTable) {
this.targetTable = targetTable != null ? targetTable.build() : null;
}
@Override
public final Builder targetTable(TableIdentifier targetTable) {
this.targetTable = targetTable;
return this;
}
public final String getCatalogId() {
return catalogId;
}
public final void setCatalogId(String catalogId) {
this.catalogId = catalogId;
}
@Override
public final Builder catalogId(String catalogId) {
this.catalogId = catalogId;
return this;
}
public final String getVersionId() {
return versionId;
}
public final void setVersionId(String versionId) {
this.versionId = versionId;
}
@Override
public final Builder versionId(String versionId) {
this.versionId = versionId;
return this;
}
@Override
public Table build() {
return new Table(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}