/* * 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 the data being transformed during an action. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ViewFrame implements Serializable, Cloneable, StructuredPojo { /** *

* The starting index for the range of columns to return in the view frame. *

*/ private Integer startColumnIndex; /** *

* The number of columns to include in the view frame, beginning with the StartColumnIndex value and * ignoring any columns in the HiddenColumns list. *

*/ private Integer columnRange; /** *

* A list of columns to hide in the view frame. *

*/ private java.util.List hiddenColumns; /** *

* The starting index for the range of rows to return in the view frame. *

*/ private Integer startRowIndex; /** *

* The number of rows to include in the view frame, beginning with the StartRowIndex value. *

*/ private Integer rowRange; /** *

* Controls if analytics computation is enabled or disabled. Enabled by default. *

*/ private String analytics; /** *

* The starting index for the range of columns to return in the view frame. *

* * @param startColumnIndex * The starting index for the range of columns to return in the view frame. */ public void setStartColumnIndex(Integer startColumnIndex) { this.startColumnIndex = startColumnIndex; } /** *

* The starting index for the range of columns to return in the view frame. *

* * @return The starting index for the range of columns to return in the view frame. */ public Integer getStartColumnIndex() { return this.startColumnIndex; } /** *

* The starting index for the range of columns to return in the view frame. *

* * @param startColumnIndex * The starting index for the range of columns to return in the view frame. * @return Returns a reference to this object so that method calls can be chained together. */ public ViewFrame withStartColumnIndex(Integer startColumnIndex) { setStartColumnIndex(startColumnIndex); return this; } /** *

* The number of columns to include in the view frame, beginning with the StartColumnIndex value and * ignoring any columns in the HiddenColumns list. *

* * @param columnRange * The number of columns to include in the view frame, beginning with the StartColumnIndex value * and ignoring any columns in the HiddenColumns list. */ public void setColumnRange(Integer columnRange) { this.columnRange = columnRange; } /** *

* The number of columns to include in the view frame, beginning with the StartColumnIndex value and * ignoring any columns in the HiddenColumns list. *

* * @return The number of columns to include in the view frame, beginning with the StartColumnIndex * value and ignoring any columns in the HiddenColumns list. */ public Integer getColumnRange() { return this.columnRange; } /** *

* The number of columns to include in the view frame, beginning with the StartColumnIndex value and * ignoring any columns in the HiddenColumns list. *

* * @param columnRange * The number of columns to include in the view frame, beginning with the StartColumnIndex value * and ignoring any columns in the HiddenColumns list. * @return Returns a reference to this object so that method calls can be chained together. */ public ViewFrame withColumnRange(Integer columnRange) { setColumnRange(columnRange); return this; } /** *

* A list of columns to hide in the view frame. *

* * @return A list of columns to hide in the view frame. */ public java.util.List getHiddenColumns() { return hiddenColumns; } /** *

* A list of columns to hide in the view frame. *

* * @param hiddenColumns * A list of columns to hide in the view frame. */ public void setHiddenColumns(java.util.Collection hiddenColumns) { if (hiddenColumns == null) { this.hiddenColumns = null; return; } this.hiddenColumns = new java.util.ArrayList(hiddenColumns); } /** *

* A list of columns to hide in the view frame. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setHiddenColumns(java.util.Collection)} or {@link #withHiddenColumns(java.util.Collection)} if you want * to override the existing values. *

* * @param hiddenColumns * A list of columns to hide in the view frame. * @return Returns a reference to this object so that method calls can be chained together. */ public ViewFrame withHiddenColumns(String... hiddenColumns) { if (this.hiddenColumns == null) { setHiddenColumns(new java.util.ArrayList(hiddenColumns.length)); } for (String ele : hiddenColumns) { this.hiddenColumns.add(ele); } return this; } /** *

* A list of columns to hide in the view frame. *

* * @param hiddenColumns * A list of columns to hide in the view frame. * @return Returns a reference to this object so that method calls can be chained together. */ public ViewFrame withHiddenColumns(java.util.Collection hiddenColumns) { setHiddenColumns(hiddenColumns); return this; } /** *

* The starting index for the range of rows to return in the view frame. *

* * @param startRowIndex * The starting index for the range of rows to return in the view frame. */ public void setStartRowIndex(Integer startRowIndex) { this.startRowIndex = startRowIndex; } /** *

* The starting index for the range of rows to return in the view frame. *

* * @return The starting index for the range of rows to return in the view frame. */ public Integer getStartRowIndex() { return this.startRowIndex; } /** *

* The starting index for the range of rows to return in the view frame. *

* * @param startRowIndex * The starting index for the range of rows to return in the view frame. * @return Returns a reference to this object so that method calls can be chained together. */ public ViewFrame withStartRowIndex(Integer startRowIndex) { setStartRowIndex(startRowIndex); return this; } /** *

* The number of rows to include in the view frame, beginning with the StartRowIndex value. *

* * @param rowRange * The number of rows to include in the view frame, beginning with the StartRowIndex value. */ public void setRowRange(Integer rowRange) { this.rowRange = rowRange; } /** *

* The number of rows to include in the view frame, beginning with the StartRowIndex value. *

* * @return The number of rows to include in the view frame, beginning with the StartRowIndex value. */ public Integer getRowRange() { return this.rowRange; } /** *

* The number of rows to include in the view frame, beginning with the StartRowIndex value. *

* * @param rowRange * The number of rows to include in the view frame, beginning with the StartRowIndex value. * @return Returns a reference to this object so that method calls can be chained together. */ public ViewFrame withRowRange(Integer rowRange) { setRowRange(rowRange); return this; } /** *

* Controls if analytics computation is enabled or disabled. Enabled by default. *

* * @param analytics * Controls if analytics computation is enabled or disabled. Enabled by default. * @see AnalyticsMode */ public void setAnalytics(String analytics) { this.analytics = analytics; } /** *

* Controls if analytics computation is enabled or disabled. Enabled by default. *

* * @return Controls if analytics computation is enabled or disabled. Enabled by default. * @see AnalyticsMode */ public String getAnalytics() { return this.analytics; } /** *

* Controls if analytics computation is enabled or disabled. Enabled by default. *

* * @param analytics * Controls if analytics computation is enabled or disabled. Enabled by default. * @return Returns a reference to this object so that method calls can be chained together. * @see AnalyticsMode */ public ViewFrame withAnalytics(String analytics) { setAnalytics(analytics); return this; } /** *

* Controls if analytics computation is enabled or disabled. Enabled by default. *

* * @param analytics * Controls if analytics computation is enabled or disabled. Enabled by default. * @return Returns a reference to this object so that method calls can be chained together. * @see AnalyticsMode */ public ViewFrame withAnalytics(AnalyticsMode analytics) { this.analytics = analytics.toString(); 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 (getStartColumnIndex() != null) sb.append("StartColumnIndex: ").append(getStartColumnIndex()).append(","); if (getColumnRange() != null) sb.append("ColumnRange: ").append(getColumnRange()).append(","); if (getHiddenColumns() != null) sb.append("HiddenColumns: ").append(getHiddenColumns()).append(","); if (getStartRowIndex() != null) sb.append("StartRowIndex: ").append(getStartRowIndex()).append(","); if (getRowRange() != null) sb.append("RowRange: ").append(getRowRange()).append(","); if (getAnalytics() != null) sb.append("Analytics: ").append(getAnalytics()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ViewFrame == false) return false; ViewFrame other = (ViewFrame) obj; if (other.getStartColumnIndex() == null ^ this.getStartColumnIndex() == null) return false; if (other.getStartColumnIndex() != null && other.getStartColumnIndex().equals(this.getStartColumnIndex()) == false) return false; if (other.getColumnRange() == null ^ this.getColumnRange() == null) return false; if (other.getColumnRange() != null && other.getColumnRange().equals(this.getColumnRange()) == false) return false; if (other.getHiddenColumns() == null ^ this.getHiddenColumns() == null) return false; if (other.getHiddenColumns() != null && other.getHiddenColumns().equals(this.getHiddenColumns()) == false) return false; if (other.getStartRowIndex() == null ^ this.getStartRowIndex() == null) return false; if (other.getStartRowIndex() != null && other.getStartRowIndex().equals(this.getStartRowIndex()) == false) return false; if (other.getRowRange() == null ^ this.getRowRange() == null) return false; if (other.getRowRange() != null && other.getRowRange().equals(this.getRowRange()) == false) return false; if (other.getAnalytics() == null ^ this.getAnalytics() == null) return false; if (other.getAnalytics() != null && other.getAnalytics().equals(this.getAnalytics()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStartColumnIndex() == null) ? 0 : getStartColumnIndex().hashCode()); hashCode = prime * hashCode + ((getColumnRange() == null) ? 0 : getColumnRange().hashCode()); hashCode = prime * hashCode + ((getHiddenColumns() == null) ? 0 : getHiddenColumns().hashCode()); hashCode = prime * hashCode + ((getStartRowIndex() == null) ? 0 : getStartRowIndex().hashCode()); hashCode = prime * hashCode + ((getRowRange() == null) ? 0 : getRowRange().hashCode()); hashCode = prime * hashCode + ((getAnalytics() == null) ? 0 : getAnalytics().hashCode()); return hashCode; } @Override public ViewFrame clone() { try { return (ViewFrame) 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.ViewFrameMarshaller.getInstance().marshall(this, protocolMarshaller); } }