com.amazonaws.services.macie2.model.Cell Maven / Gradle / Ivy
Show all versions of aws-java-sdk-macie2 Show documentation
/*
* 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.macie2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Specifies the location of an occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Cell implements Serializable, Cloneable, StructuredPojo {
/**
*
* The location of the cell, as an absolute cell reference, that contains the sensitive data, for example Sheet2!C5
* for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
*
*/
private String cellReference;
/**
*
* The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this value
* correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2 for column B,
* and so on.
*
*/
private Long column;
/**
*
* The name of the column that contains the sensitive data, if available.
*
*/
private String columnName;
/**
*
* The row number of the row that contains the sensitive data.
*
*/
private Long row;
/**
*
* The location of the cell, as an absolute cell reference, that contains the sensitive data, for example Sheet2!C5
* for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
*
*
* @param cellReference
* The location of the cell, as an absolute cell reference, that contains the sensitive data, for example
* Sheet2!C5 for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
*/
public void setCellReference(String cellReference) {
this.cellReference = cellReference;
}
/**
*
* The location of the cell, as an absolute cell reference, that contains the sensitive data, for example Sheet2!C5
* for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
*
*
* @return The location of the cell, as an absolute cell reference, that contains the sensitive data, for example
* Sheet2!C5 for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
*/
public String getCellReference() {
return this.cellReference;
}
/**
*
* The location of the cell, as an absolute cell reference, that contains the sensitive data, for example Sheet2!C5
* for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
*
*
* @param cellReference
* The location of the cell, as an absolute cell reference, that contains the sensitive data, for example
* Sheet2!C5 for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Cell withCellReference(String cellReference) {
setCellReference(cellReference);
return this;
}
/**
*
* The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this value
* correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2 for column B,
* and so on.
*
*
* @param column
* The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this
* value correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2
* for column B, and so on.
*/
public void setColumn(Long column) {
this.column = column;
}
/**
*
* The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this value
* correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2 for column B,
* and so on.
*
*
* @return The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this
* value correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2
* for column B, and so on.
*/
public Long getColumn() {
return this.column;
}
/**
*
* The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this value
* correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2 for column B,
* and so on.
*
*
* @param column
* The column number of the column that contains the sensitive data. For a Microsoft Excel workbook, this
* value correlates to the alphabetical character(s) for a column identifier, for example: 1 for column A, 2
* for column B, and so on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Cell withColumn(Long column) {
setColumn(column);
return this;
}
/**
*
* The name of the column that contains the sensitive data, if available.
*
*
* @param columnName
* The name of the column that contains the sensitive data, if available.
*/
public void setColumnName(String columnName) {
this.columnName = columnName;
}
/**
*
* The name of the column that contains the sensitive data, if available.
*
*
* @return The name of the column that contains the sensitive data, if available.
*/
public String getColumnName() {
return this.columnName;
}
/**
*
* The name of the column that contains the sensitive data, if available.
*
*
* @param columnName
* The name of the column that contains the sensitive data, if available.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Cell withColumnName(String columnName) {
setColumnName(columnName);
return this;
}
/**
*
* The row number of the row that contains the sensitive data.
*
*
* @param row
* The row number of the row that contains the sensitive data.
*/
public void setRow(Long row) {
this.row = row;
}
/**
*
* The row number of the row that contains the sensitive data.
*
*
* @return The row number of the row that contains the sensitive data.
*/
public Long getRow() {
return this.row;
}
/**
*
* The row number of the row that contains the sensitive data.
*
*
* @param row
* The row number of the row that contains the sensitive data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Cell withRow(Long row) {
setRow(row);
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 (getCellReference() != null)
sb.append("CellReference: ").append(getCellReference()).append(",");
if (getColumn() != null)
sb.append("Column: ").append(getColumn()).append(",");
if (getColumnName() != null)
sb.append("ColumnName: ").append(getColumnName()).append(",");
if (getRow() != null)
sb.append("Row: ").append(getRow());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Cell == false)
return false;
Cell other = (Cell) obj;
if (other.getCellReference() == null ^ this.getCellReference() == null)
return false;
if (other.getCellReference() != null && other.getCellReference().equals(this.getCellReference()) == false)
return false;
if (other.getColumn() == null ^ this.getColumn() == null)
return false;
if (other.getColumn() != null && other.getColumn().equals(this.getColumn()) == false)
return false;
if (other.getColumnName() == null ^ this.getColumnName() == null)
return false;
if (other.getColumnName() != null && other.getColumnName().equals(this.getColumnName()) == false)
return false;
if (other.getRow() == null ^ this.getRow() == null)
return false;
if (other.getRow() != null && other.getRow().equals(this.getRow()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCellReference() == null) ? 0 : getCellReference().hashCode());
hashCode = prime * hashCode + ((getColumn() == null) ? 0 : getColumn().hashCode());
hashCode = prime * hashCode + ((getColumnName() == null) ? 0 : getColumnName().hashCode());
hashCode = prime * hashCode + ((getRow() == null) ? 0 : getRow().hashCode());
return hashCode;
}
@Override
public Cell clone() {
try {
return (Cell) 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.macie2.model.transform.CellMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}