com.amazonaws.services.kinesisfirehose.model.SchemaConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-kinesis Show documentation
/*
* Copyright 2019-2024 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;
/**
*
* Specifies the schema to which you want Kinesis Data Firehose to configure your data before it writes it to Amazon S3.
* This parameter is required if Enabled
is set to true.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SchemaConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the same
* account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value must be
* specified.
*
*
*/
private String roleARN;
/**
*
* The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services account ID
* is used by default.
*
*/
private String catalogId;
/**
*
* Specifies the name of the Amazon Web Services Glue database that contains the schema for the output data.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its value must
* be specified.
*
*
*/
private String databaseName;
/**
*
* Specifies the Amazon Web Services Glue table that contains the column information that constitutes your data
* schema.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value must be
* specified.
*
*
*/
private String tableName;
/**
*
* If you don't specify an Amazon Web Services Region, the default is the current Region.
*
*/
private String region;
/**
*
* Specifies the table version for the output data schema. If you don't specify this version ID, or if you set it to
* LATEST
, Kinesis Data Firehose uses the most recent version. This means that any updates to the table
* are automatically picked up.
*
*/
private String versionId;
/**
*
* The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the same
* account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value must be
* specified.
*
*
*
* @param roleARN
* The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the
* same account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value
* must be specified.
*
*/
public void setRoleARN(String roleARN) {
this.roleARN = roleARN;
}
/**
*
* The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the same
* account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value must be
* specified.
*
*
*
* @return The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the
* same account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value
* must be specified.
*
*/
public String getRoleARN() {
return this.roleARN;
}
/**
*
* The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the same
* account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value must be
* specified.
*
*
*
* @param roleARN
* The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the
* same account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the RoleARN
property is required and its value
* must be specified.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SchemaConfiguration withRoleARN(String roleARN) {
setRoleARN(roleARN);
return this;
}
/**
*
* The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services account ID
* is used by default.
*
*
* @param catalogId
* The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services
* account ID is used by default.
*/
public void setCatalogId(String catalogId) {
this.catalogId = catalogId;
}
/**
*
* The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services account ID
* is used by default.
*
*
* @return The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services
* account ID is used by default.
*/
public String getCatalogId() {
return this.catalogId;
}
/**
*
* The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services account ID
* is used by default.
*
*
* @param catalogId
* The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services
* account ID is used by default.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SchemaConfiguration withCatalogId(String catalogId) {
setCatalogId(catalogId);
return this;
}
/**
*
* Specifies the name of the Amazon Web Services Glue database that contains the schema for the output data.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its value must
* be specified.
*
*
*
* @param databaseName
* Specifies the name of the Amazon Web Services Glue database that contains the schema for the output
* data.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its
* value must be specified.
*
*/
public void setDatabaseName(String databaseName) {
this.databaseName = databaseName;
}
/**
*
* Specifies the name of the Amazon Web Services Glue database that contains the schema for the output data.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its value must
* be specified.
*
*
*
* @return Specifies the name of the Amazon Web Services Glue database that contains the schema for the output
* data.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its
* value must be specified.
*
*/
public String getDatabaseName() {
return this.databaseName;
}
/**
*
* Specifies the name of the Amazon Web Services Glue database that contains the schema for the output data.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its value must
* be specified.
*
*
*
* @param databaseName
* Specifies the name of the Amazon Web Services Glue database that contains the schema for the output
* data.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the DatabaseName
property is required and its
* value must be specified.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SchemaConfiguration withDatabaseName(String databaseName) {
setDatabaseName(databaseName);
return this;
}
/**
*
* Specifies the Amazon Web Services Glue table that contains the column information that constitutes your data
* schema.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value must be
* specified.
*
*
*
* @param tableName
* Specifies the Amazon Web Services Glue table that contains the column information that constitutes your
* data schema.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value
* must be specified.
*
*/
public void setTableName(String tableName) {
this.tableName = tableName;
}
/**
*
* Specifies the Amazon Web Services Glue table that contains the column information that constitutes your data
* schema.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value must be
* specified.
*
*
*
* @return Specifies the Amazon Web Services Glue table that contains the column information that constitutes your
* data schema.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value
* must be specified.
*
*/
public String getTableName() {
return this.tableName;
}
/**
*
* Specifies the Amazon Web Services Glue table that contains the column information that constitutes your data
* schema.
*
*
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value must be
* specified.
*
*
*
* @param tableName
* Specifies the Amazon Web Services Glue table that contains the column information that constitutes your
* data schema.
*
* If the SchemaConfiguration
request parameter is used as part of invoking the
* CreateDeliveryStream
API, then the TableName
property is required and its value
* must be specified.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SchemaConfiguration withTableName(String tableName) {
setTableName(tableName);
return this;
}
/**
*
* If you don't specify an Amazon Web Services Region, the default is the current Region.
*
*
* @param region
* If you don't specify an Amazon Web Services Region, the default is the current Region.
*/
public void setRegion(String region) {
this.region = region;
}
/**
*
* If you don't specify an Amazon Web Services Region, the default is the current Region.
*
*
* @return If you don't specify an Amazon Web Services Region, the default is the current Region.
*/
public String getRegion() {
return this.region;
}
/**
*
* If you don't specify an Amazon Web Services Region, the default is the current Region.
*
*
* @param region
* If you don't specify an Amazon Web Services Region, the default is the current Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SchemaConfiguration withRegion(String region) {
setRegion(region);
return this;
}
/**
*
* Specifies the table version for the output data schema. If you don't specify this version ID, or if you set it to
* LATEST
, Kinesis Data Firehose uses the most recent version. This means that any updates to the table
* are automatically picked up.
*
*
* @param versionId
* Specifies the table version for the output data schema. If you don't specify this version ID, or if you
* set it to LATEST
, Kinesis Data Firehose uses the most recent version. This means that any
* updates to the table are automatically picked up.
*/
public void setVersionId(String versionId) {
this.versionId = versionId;
}
/**
*
* Specifies the table version for the output data schema. If you don't specify this version ID, or if you set it to
* LATEST
, Kinesis Data Firehose uses the most recent version. This means that any updates to the table
* are automatically picked up.
*
*
* @return Specifies the table version for the output data schema. If you don't specify this version ID, or if you
* set it to LATEST
, Kinesis Data Firehose uses the most recent version. This means that any
* updates to the table are automatically picked up.
*/
public String getVersionId() {
return this.versionId;
}
/**
*
* Specifies the table version for the output data schema. If you don't specify this version ID, or if you set it to
* LATEST
, Kinesis Data Firehose uses the most recent version. This means that any updates to the table
* are automatically picked up.
*
*
* @param versionId
* Specifies the table version for the output data schema. If you don't specify this version ID, or if you
* set it to LATEST
, Kinesis Data Firehose uses the most recent version. This means that any
* updates to the table are automatically picked up.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SchemaConfiguration withVersionId(String versionId) {
setVersionId(versionId);
return this;
}
/**
* 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.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getRoleARN() != null)
sb.append("RoleARN: ").append(getRoleARN()).append(",");
if (getCatalogId() != null)
sb.append("CatalogId: ").append(getCatalogId()).append(",");
if (getDatabaseName() != null)
sb.append("DatabaseName: ").append(getDatabaseName()).append(",");
if (getTableName() != null)
sb.append("TableName: ").append(getTableName()).append(",");
if (getRegion() != null)
sb.append("Region: ").append(getRegion()).append(",");
if (getVersionId() != null)
sb.append("VersionId: ").append(getVersionId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SchemaConfiguration == false)
return false;
SchemaConfiguration other = (SchemaConfiguration) obj;
if (other.getRoleARN() == null ^ this.getRoleARN() == null)
return false;
if (other.getRoleARN() != null && other.getRoleARN().equals(this.getRoleARN()) == false)
return false;
if (other.getCatalogId() == null ^ this.getCatalogId() == null)
return false;
if (other.getCatalogId() != null && other.getCatalogId().equals(this.getCatalogId()) == false)
return false;
if (other.getDatabaseName() == null ^ this.getDatabaseName() == null)
return false;
if (other.getDatabaseName() != null && other.getDatabaseName().equals(this.getDatabaseName()) == false)
return false;
if (other.getTableName() == null ^ this.getTableName() == null)
return false;
if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false)
return false;
if (other.getRegion() == null ^ this.getRegion() == null)
return false;
if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false)
return false;
if (other.getVersionId() == null ^ this.getVersionId() == null)
return false;
if (other.getVersionId() != null && other.getVersionId().equals(this.getVersionId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode());
hashCode = prime * hashCode + ((getCatalogId() == null) ? 0 : getCatalogId().hashCode());
hashCode = prime * hashCode + ((getDatabaseName() == null) ? 0 : getDatabaseName().hashCode());
hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode());
hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode());
hashCode = prime * hashCode + ((getVersionId() == null) ? 0 : getVersionId().hashCode());
return hashCode;
}
@Override
public SchemaConfiguration clone() {
try {
return (SchemaConfiguration) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.kinesisfirehose.model.transform.SchemaConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}