All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.kinesisfirehose.model.CopyCommand Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 

* Describes a COPY command for Amazon Redshift. *

*/ public class CopyCommand implements Serializable, Cloneable { /** *

* The name of the target table. The table must already exist in the * database. *

*/ private String dataTableName; /** *

* A comma-separated list of column names. *

*/ private String dataTableColumns; /** *

* Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of * Amazon * Redshift COPY command. Some possible examples that would apply to * Firehose are as follows. *

*

* delimiter '\t' lzop; - fields are delimited with "\t" (TAB * character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this is the * default delimiter). *

*

* delimiter '|' escape - the delimiter should be escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified after * every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, * and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. *

*/ private String copyOptions; /** *

* The name of the target table. The table must already exist in the * database. *

* * @param dataTableName * The name of the target table. The table must already exist in the * database. */ public void setDataTableName(String dataTableName) { this.dataTableName = dataTableName; } /** *

* The name of the target table. The table must already exist in the * database. *

* * @return The name of the target table. The table must already exist in the * database. */ public String getDataTableName() { return this.dataTableName; } /** *

* The name of the target table. The table must already exist in the * database. *

* * @param dataTableName * The name of the target table. The table must already exist in the * database. * @return Returns a reference to this object so that method calls can be * chained together. */ public CopyCommand withDataTableName(String dataTableName) { setDataTableName(dataTableName); return this; } /** *

* A comma-separated list of column names. *

* * @param dataTableColumns * A comma-separated list of column names. */ public void setDataTableColumns(String dataTableColumns) { this.dataTableColumns = dataTableColumns; } /** *

* A comma-separated list of column names. *

* * @return A comma-separated list of column names. */ public String getDataTableColumns() { return this.dataTableColumns; } /** *

* A comma-separated list of column names. *

* * @param dataTableColumns * A comma-separated list of column names. * @return Returns a reference to this object so that method calls can be * chained together. */ public CopyCommand withDataTableColumns(String dataTableColumns) { setDataTableColumns(dataTableColumns); return this; } /** *

* Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of * Amazon * Redshift COPY command. Some possible examples that would apply to * Firehose are as follows. *

*

* delimiter '\t' lzop; - fields are delimited with "\t" (TAB * character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this is the * default delimiter). *

*

* delimiter '|' escape - the delimiter should be escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified after * every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, * and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. *

* * @param copyOptions * Optional parameters to use with the Amazon Redshift * COPY command. For more information, see the * "Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that * would apply to Firehose are as follows.

*

* delimiter '\t' lzop; - fields are delimited with "\t" * (TAB character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this is * the default delimiter). *

*

* delimiter '|' escape - the delimiter should be * escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified * after every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON * format, and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. */ public void setCopyOptions(String copyOptions) { this.copyOptions = copyOptions; } /** *

* Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of * Amazon * Redshift COPY command. Some possible examples that would apply to * Firehose are as follows. *

*

* delimiter '\t' lzop; - fields are delimited with "\t" (TAB * character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this is the * default delimiter). *

*

* delimiter '|' escape - the delimiter should be escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified after * every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, * and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. *

* * @return Optional parameters to use with the Amazon Redshift * COPY command. For more information, see the * "Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that * would apply to Firehose are as follows.

*

* delimiter '\t' lzop; - fields are delimited with * "\t" (TAB character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this * is the default delimiter). *

*

* delimiter '|' escape - the delimiter should be * escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified * after every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON * format, and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. */ public String getCopyOptions() { return this.copyOptions; } /** *

* Optional parameters to use with the Amazon Redshift COPY * command. For more information, see the "Optional Parameters" section of * Amazon * Redshift COPY command. Some possible examples that would apply to * Firehose are as follows. *

*

* delimiter '\t' lzop; - fields are delimited with "\t" (TAB * character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this is the * default delimiter). *

*

* delimiter '|' escape - the delimiter should be escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified after * every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, * and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. *

* * @param copyOptions * Optional parameters to use with the Amazon Redshift * COPY command. For more information, see the * "Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that * would apply to Firehose are as follows.

*

* delimiter '\t' lzop; - fields are delimited with "\t" * (TAB character) and compressed using lzop. *

*

* delimiter '| - fields are delimited with "|" (this is * the default delimiter). *

*

* delimiter '|' escape - the delimiter should be * escaped. *

*

* fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' * - fields are fixed width in the source, with each width specified * after every column in the table. *

*

* JSON 's3://mybucket/jsonpaths.txt' - data is in JSON * format, and the path specified is the format of the data. *

*

* For more examples, see Amazon Redshift COPY command examples. * @return Returns a reference to this object so that method calls can be * chained together. */ public CopyCommand withCopyOptions(String copyOptions) { setCopyOptions(copyOptions); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDataTableName() != null) sb.append("DataTableName: " + getDataTableName() + ","); if (getDataTableColumns() != null) sb.append("DataTableColumns: " + getDataTableColumns() + ","); if (getCopyOptions() != null) sb.append("CopyOptions: " + getCopyOptions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CopyCommand == false) return false; CopyCommand other = (CopyCommand) obj; if (other.getDataTableName() == null ^ this.getDataTableName() == null) return false; if (other.getDataTableName() != null && other.getDataTableName().equals(this.getDataTableName()) == false) return false; if (other.getDataTableColumns() == null ^ this.getDataTableColumns() == null) return false; if (other.getDataTableColumns() != null && other.getDataTableColumns().equals( this.getDataTableColumns()) == false) return false; if (other.getCopyOptions() == null ^ this.getCopyOptions() == null) return false; if (other.getCopyOptions() != null && other.getCopyOptions().equals(this.getCopyOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDataTableName() == null) ? 0 : getDataTableName() .hashCode()); hashCode = prime * hashCode + ((getDataTableColumns() == null) ? 0 : getDataTableColumns() .hashCode()); hashCode = prime * hashCode + ((getCopyOptions() == null) ? 0 : getCopyOptions().hashCode()); return hashCode; } @Override public CopyCommand clone() { try { return (CopyCommand) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy