/* * 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.gluedatabrew.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents options that specify how and where in Amazon S3 DataBrew writes the output generated by recipe jobs or * profile jobs. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Output implements Serializable, Cloneable, StructuredPojo { /** ** The compression algorithm used to compress the output text of the job. *
*/ private String compressionFormat; /** ** The data format of the output of the job. *
*/ private String format; /** ** The names of one or more partition columns for the output of the job. *
*/ private java.util.List* The location in Amazon S3 where the job writes its output. *
*/ private S3Location location; /** ** A value that, if true, means that any data in the location specified for output is overwritten with new output. *
*/ private Boolean overwrite; /** ** Represents options that define how DataBrew formats job output files. *
*/ private OutputFormatOptions formatOptions; /** ** Maximum number of files to be generated by the job and written to the output folder. For output partitioned by * column(s), the MaxOutputFiles value is the maximum number of files per partition. *
*/ private Integer maxOutputFiles; /** ** The compression algorithm used to compress the output text of the job. *
* * @param compressionFormat * The compression algorithm used to compress the output text of the job. * @see CompressionFormat */ public void setCompressionFormat(String compressionFormat) { this.compressionFormat = compressionFormat; } /** ** The compression algorithm used to compress the output text of the job. *
* * @return The compression algorithm used to compress the output text of the job. * @see CompressionFormat */ public String getCompressionFormat() { return this.compressionFormat; } /** ** The compression algorithm used to compress the output text of the job. *
* * @param compressionFormat * The compression algorithm used to compress the output text of the job. * @return Returns a reference to this object so that method calls can be chained together. * @see CompressionFormat */ public Output withCompressionFormat(String compressionFormat) { setCompressionFormat(compressionFormat); return this; } /** ** The compression algorithm used to compress the output text of the job. *
* * @param compressionFormat * The compression algorithm used to compress the output text of the job. * @return Returns a reference to this object so that method calls can be chained together. * @see CompressionFormat */ public Output withCompressionFormat(CompressionFormat compressionFormat) { this.compressionFormat = compressionFormat.toString(); return this; } /** ** The data format of the output of the job. *
* * @param format * The data format of the output of the job. * @see OutputFormat */ public void setFormat(String format) { this.format = format; } /** ** The data format of the output of the job. *
* * @return The data format of the output of the job. * @see OutputFormat */ public String getFormat() { return this.format; } /** ** The data format of the output of the job. *
* * @param format * The data format of the output of the job. * @return Returns a reference to this object so that method calls can be chained together. * @see OutputFormat */ public Output withFormat(String format) { setFormat(format); return this; } /** ** The data format of the output of the job. *
* * @param format * The data format of the output of the job. * @return Returns a reference to this object so that method calls can be chained together. * @see OutputFormat */ public Output withFormat(OutputFormat format) { this.format = format.toString(); return this; } /** ** The names of one or more partition columns for the output of the job. *
* * @return The names of one or more partition columns for the output of the job. */ public java.util.List* The names of one or more partition columns for the output of the job. *
* * @param partitionColumns * The names of one or more partition columns for the output of the job. */ public void setPartitionColumns(java.util.Collection* The names of one or more partition columns for the output of the job. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPartitionColumns(java.util.Collection)} or {@link #withPartitionColumns(java.util.Collection)} if you * want to override the existing values. *
* * @param partitionColumns * The names of one or more partition columns for the output of the job. * @return Returns a reference to this object so that method calls can be chained together. */ public Output withPartitionColumns(String... partitionColumns) { if (this.partitionColumns == null) { setPartitionColumns(new java.util.ArrayList* The names of one or more partition columns for the output of the job. *
* * @param partitionColumns * The names of one or more partition columns for the output of the job. * @return Returns a reference to this object so that method calls can be chained together. */ public Output withPartitionColumns(java.util.Collection* The location in Amazon S3 where the job writes its output. *
* * @param location * The location in Amazon S3 where the job writes its output. */ public void setLocation(S3Location location) { this.location = location; } /** ** The location in Amazon S3 where the job writes its output. *
* * @return The location in Amazon S3 where the job writes its output. */ public S3Location getLocation() { return this.location; } /** ** The location in Amazon S3 where the job writes its output. *
* * @param location * The location in Amazon S3 where the job writes its output. * @return Returns a reference to this object so that method calls can be chained together. */ public Output withLocation(S3Location location) { setLocation(location); return this; } /** ** A value that, if true, means that any data in the location specified for output is overwritten with new output. *
* * @param overwrite * A value that, if true, means that any data in the location specified for output is overwritten with new * output. */ public void setOverwrite(Boolean overwrite) { this.overwrite = overwrite; } /** ** A value that, if true, means that any data in the location specified for output is overwritten with new output. *
* * @return A value that, if true, means that any data in the location specified for output is overwritten with new * output. */ public Boolean getOverwrite() { return this.overwrite; } /** ** A value that, if true, means that any data in the location specified for output is overwritten with new output. *
* * @param overwrite * A value that, if true, means that any data in the location specified for output is overwritten with new * output. * @return Returns a reference to this object so that method calls can be chained together. */ public Output withOverwrite(Boolean overwrite) { setOverwrite(overwrite); return this; } /** ** A value that, if true, means that any data in the location specified for output is overwritten with new output. *
* * @return A value that, if true, means that any data in the location specified for output is overwritten with new * output. */ public Boolean isOverwrite() { return this.overwrite; } /** ** Represents options that define how DataBrew formats job output files. *
* * @param formatOptions * Represents options that define how DataBrew formats job output files. */ public void setFormatOptions(OutputFormatOptions formatOptions) { this.formatOptions = formatOptions; } /** ** Represents options that define how DataBrew formats job output files. *
* * @return Represents options that define how DataBrew formats job output files. */ public OutputFormatOptions getFormatOptions() { return this.formatOptions; } /** ** Represents options that define how DataBrew formats job output files. *
* * @param formatOptions * Represents options that define how DataBrew formats job output files. * @return Returns a reference to this object so that method calls can be chained together. */ public Output withFormatOptions(OutputFormatOptions formatOptions) { setFormatOptions(formatOptions); return this; } /** ** Maximum number of files to be generated by the job and written to the output folder. For output partitioned by * column(s), the MaxOutputFiles value is the maximum number of files per partition. *
* * @param maxOutputFiles * Maximum number of files to be generated by the job and written to the output folder. For output * partitioned by column(s), the MaxOutputFiles value is the maximum number of files per partition. */ public void setMaxOutputFiles(Integer maxOutputFiles) { this.maxOutputFiles = maxOutputFiles; } /** ** Maximum number of files to be generated by the job and written to the output folder. For output partitioned by * column(s), the MaxOutputFiles value is the maximum number of files per partition. *
* * @return Maximum number of files to be generated by the job and written to the output folder. For output * partitioned by column(s), the MaxOutputFiles value is the maximum number of files per partition. */ public Integer getMaxOutputFiles() { return this.maxOutputFiles; } /** ** Maximum number of files to be generated by the job and written to the output folder. For output partitioned by * column(s), the MaxOutputFiles value is the maximum number of files per partition. *
* * @param maxOutputFiles * Maximum number of files to be generated by the job and written to the output folder. For output * partitioned by column(s), the MaxOutputFiles value is the maximum number of files per partition. * @return Returns a reference to this object so that method calls can be chained together. */ public Output withMaxOutputFiles(Integer maxOutputFiles) { setMaxOutputFiles(maxOutputFiles); 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 (getCompressionFormat() != null) sb.append("CompressionFormat: ").append(getCompressionFormat()).append(","); if (getFormat() != null) sb.append("Format: ").append(getFormat()).append(","); if (getPartitionColumns() != null) sb.append("PartitionColumns: ").append(getPartitionColumns()).append(","); if (getLocation() != null) sb.append("Location: ").append(getLocation()).append(","); if (getOverwrite() != null) sb.append("Overwrite: ").append(getOverwrite()).append(","); if (getFormatOptions() != null) sb.append("FormatOptions: ").append(getFormatOptions()).append(","); if (getMaxOutputFiles() != null) sb.append("MaxOutputFiles: ").append(getMaxOutputFiles()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Output == false) return false; Output other = (Output) obj; if (other.getCompressionFormat() == null ^ this.getCompressionFormat() == null) return false; if (other.getCompressionFormat() != null && other.getCompressionFormat().equals(this.getCompressionFormat()) == false) return false; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; if (other.getPartitionColumns() == null ^ this.getPartitionColumns() == null) return false; if (other.getPartitionColumns() != null && other.getPartitionColumns().equals(this.getPartitionColumns()) == false) return false; if (other.getLocation() == null ^ this.getLocation() == null) return false; if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false) return false; if (other.getOverwrite() == null ^ this.getOverwrite() == null) return false; if (other.getOverwrite() != null && other.getOverwrite().equals(this.getOverwrite()) == false) return false; if (other.getFormatOptions() == null ^ this.getFormatOptions() == null) return false; if (other.getFormatOptions() != null && other.getFormatOptions().equals(this.getFormatOptions()) == false) return false; if (other.getMaxOutputFiles() == null ^ this.getMaxOutputFiles() == null) return false; if (other.getMaxOutputFiles() != null && other.getMaxOutputFiles().equals(this.getMaxOutputFiles()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCompressionFormat() == null) ? 0 : getCompressionFormat().hashCode()); hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getPartitionColumns() == null) ? 0 : getPartitionColumns().hashCode()); hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); hashCode = prime * hashCode + ((getOverwrite() == null) ? 0 : getOverwrite().hashCode()); hashCode = prime * hashCode + ((getFormatOptions() == null) ? 0 : getFormatOptions().hashCode()); hashCode = prime * hashCode + ((getMaxOutputFiles() == null) ? 0 : getMaxOutputFiles().hashCode()); return hashCode; } @Override public Output clone() { try { return (Output) 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.gluedatabrew.model.transform.OutputMarshaller.getInstance().marshall(this, protocolMarshaller); } }