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

com.amazonaws.services.macie2.model.Occurrences Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Macie 2 module holds the client classes that are used for communicating with Amazon Macie 2 Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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 1-15 occurrences of sensitive data that was detected by a managed data identifier or a * custom data identifier and produced a sensitive data finding. *

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

* An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV * file. This value is null for all other types of files. *

*

* Each Cell object specifies a cell or field that contains the sensitive data. *

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

* An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such * as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the * sensitive data, and the position of the data on the specified line or lines. *

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the * location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a * file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names * that contain sensitive data. *

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

* Reserved for future use. *

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

* An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This * value is null for all other types of files. *

*

* Each Page object specifies a page that contains the sensitive data. *

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

* An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet * file, JSON file, or JSON Lines file. This value is null for all other types of files. *

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field * in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the * path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of * the line that contains the data. *

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

* An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV * file. This value is null for all other types of files. *

*

* Each Cell object specifies a cell or field that contains the sensitive data. *

* * @return An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, * or TSV file. This value is null for all other types of files.

*

* Each Cell object specifies a cell or field that contains the sensitive data. */ public java.util.List getCells() { return cells; } /** *

* An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV * file. This value is null for all other types of files. *

*

* Each Cell object specifies a cell or field that contains the sensitive data. *

* * @param cells * An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or * TSV file. This value is null for all other types of files.

*

* Each Cell object specifies a cell or field that contains the sensitive data. */ public void setCells(java.util.Collection cells) { if (cells == null) { this.cells = null; return; } this.cells = new java.util.ArrayList(cells); } /** *

* An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV * file. This value is null for all other types of files. *

*

* Each Cell object specifies a cell or field that contains the sensitive data. *

*

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

* * @param cells * An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or * TSV file. This value is null for all other types of files.

*

* Each Cell object specifies a cell or field that contains the sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withCells(Cell... cells) { if (this.cells == null) { setCells(new java.util.ArrayList(cells.length)); } for (Cell ele : cells) { this.cells.add(ele); } return this; } /** *

* An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV * file. This value is null for all other types of files. *

*

* Each Cell object specifies a cell or field that contains the sensitive data. *

* * @param cells * An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or * TSV file. This value is null for all other types of files.

*

* Each Cell object specifies a cell or field that contains the sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withCells(java.util.Collection cells) { setCells(cells); return this; } /** *

* An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such * as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the * sensitive data, and the position of the data on the specified line or lines. *

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the * location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a * file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names * that contain sensitive data. *

* * @return An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text * file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines * that contains the sensitive data, and the position of the data on the specified line or lines.

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions * are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a * comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that * has any column names that contain sensitive data. */ public java.util.List getLineRanges() { return lineRanges; } /** *

* An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such * as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the * sensitive data, and the position of the data on the specified line or lines. *

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the * location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a * file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names * that contain sensitive data. *

* * @param lineRanges * An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text * file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines * that contains the sensitive data, and the position of the data on the specified line or lines.

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions * are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a * comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that * has any column names that contain sensitive data. */ public void setLineRanges(java.util.Collection lineRanges) { if (lineRanges == null) { this.lineRanges = null; return; } this.lineRanges = new java.util.ArrayList(lineRanges); } /** *

* An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such * as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the * sensitive data, and the position of the data on the specified line or lines. *

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the * location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a * file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names * that contain sensitive data. *

*

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

* * @param lineRanges * An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text * file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines * that contains the sensitive data, and the position of the data on the specified line or lines.

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions * are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a * comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that * has any column names that contain sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withLineRanges(Range... lineRanges) { if (this.lineRanges == null) { setLineRanges(new java.util.ArrayList(lineRanges.length)); } for (Range ele : lineRanges) { this.lineRanges.add(ele); } return this; } /** *

* An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such * as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the * sensitive data, and the position of the data on the specified line or lines. *

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the * location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a * file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names * that contain sensitive data. *

* * @param lineRanges * An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text * file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines * that contains the sensitive data, and the position of the data on the specified line or lines.

*

* This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions * are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a * comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that * has any column names that contain sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withLineRanges(java.util.Collection lineRanges) { setLineRanges(lineRanges); return this; } /** *

* Reserved for future use. *

* * @return

* Reserved for future use. *

*/ public java.util.List getOffsetRanges() { return offsetRanges; } /** *

* Reserved for future use. *

* * @param offsetRanges *

* Reserved for future use. *

*/ public void setOffsetRanges(java.util.Collection offsetRanges) { if (offsetRanges == null) { this.offsetRanges = null; return; } this.offsetRanges = new java.util.ArrayList(offsetRanges); } /** *

* Reserved for future use. *

*

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

* * @param offsetRanges *

* Reserved for future use. *

* @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withOffsetRanges(Range... offsetRanges) { if (this.offsetRanges == null) { setOffsetRanges(new java.util.ArrayList(offsetRanges.length)); } for (Range ele : offsetRanges) { this.offsetRanges.add(ele); } return this; } /** *

* Reserved for future use. *

* * @param offsetRanges *

* Reserved for future use. *

* @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withOffsetRanges(java.util.Collection offsetRanges) { setOffsetRanges(offsetRanges); return this; } /** *

* An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This * value is null for all other types of files. *

*

* Each Page object specifies a page that contains the sensitive data. *

* * @return An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. * This value is null for all other types of files.

*

* Each Page object specifies a page that contains the sensitive data. */ public java.util.List getPages() { return pages; } /** *

* An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This * value is null for all other types of files. *

*

* Each Page object specifies a page that contains the sensitive data. *

* * @param pages * An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. * This value is null for all other types of files.

*

* Each Page object specifies a page that contains the sensitive data. */ public void setPages(java.util.Collection pages) { if (pages == null) { this.pages = null; return; } this.pages = new java.util.ArrayList(pages); } /** *

* An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This * value is null for all other types of files. *

*

* Each Page object specifies a page that contains the sensitive data. *

*

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

* * @param pages * An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. * This value is null for all other types of files.

*

* Each Page object specifies a page that contains the sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withPages(Page... pages) { if (this.pages == null) { setPages(new java.util.ArrayList(pages.length)); } for (Page ele : pages) { this.pages.add(ele); } return this; } /** *

* An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This * value is null for all other types of files. *

*

* Each Page object specifies a page that contains the sensitive data. *

* * @param pages * An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. * This value is null for all other types of files.

*

* Each Page object specifies a page that contains the sensitive data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withPages(java.util.Collection pages) { setPages(pages); return this; } /** *

* An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet * file, JSON file, or JSON Lines file. This value is null for all other types of files. *

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field * in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the * path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of * the line that contains the data. *

* * @return An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache * Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to * a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object * specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also * specifies the index of the line that contains the data. */ public java.util.List getRecords() { return records; } /** *

* An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet * file, JSON file, or JSON Lines file. This value is null for all other types of files. *

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field * in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the * path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of * the line that contains the data. *

* * @param records * An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache * Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to * a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object * specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also * specifies the index of the line that contains the data. */ public void setRecords(java.util.Collection records) { if (records == null) { this.records = null; return; } this.records = new java.util.ArrayList(records); } /** *

* An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet * file, JSON file, or JSON Lines file. This value is null for all other types of files. *

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field * in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the * path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of * the line that contains the data. *

*

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

* * @param records * An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache * Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to * a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object * specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also * specifies the index of the line that contains the data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withRecords(Record... records) { if (this.records == null) { setRecords(new java.util.ArrayList(records.length)); } for (Record ele : records) { this.records.add(ele); } return this; } /** *

* An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet * file, JSON file, or JSON Lines file. This value is null for all other types of files. *

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field * in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the * path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of * the line that contains the data. *

* * @param records * An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache * Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.

*

* For an Avro object container or Parquet file, each Record object specifies a record index and the path to * a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object * specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also * specifies the index of the line that contains the data. * @return Returns a reference to this object so that method calls can be chained together. */ public Occurrences withRecords(java.util.Collection records) { setRecords(records); 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 (getCells() != null) sb.append("Cells: ").append(getCells()).append(","); if (getLineRanges() != null) sb.append("LineRanges: ").append(getLineRanges()).append(","); if (getOffsetRanges() != null) sb.append("OffsetRanges: ").append(getOffsetRanges()).append(","); if (getPages() != null) sb.append("Pages: ").append(getPages()).append(","); if (getRecords() != null) sb.append("Records: ").append(getRecords()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Occurrences == false) return false; Occurrences other = (Occurrences) obj; if (other.getCells() == null ^ this.getCells() == null) return false; if (other.getCells() != null && other.getCells().equals(this.getCells()) == false) return false; if (other.getLineRanges() == null ^ this.getLineRanges() == null) return false; if (other.getLineRanges() != null && other.getLineRanges().equals(this.getLineRanges()) == false) return false; if (other.getOffsetRanges() == null ^ this.getOffsetRanges() == null) return false; if (other.getOffsetRanges() != null && other.getOffsetRanges().equals(this.getOffsetRanges()) == false) return false; if (other.getPages() == null ^ this.getPages() == null) return false; if (other.getPages() != null && other.getPages().equals(this.getPages()) == false) return false; if (other.getRecords() == null ^ this.getRecords() == null) return false; if (other.getRecords() != null && other.getRecords().equals(this.getRecords()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCells() == null) ? 0 : getCells().hashCode()); hashCode = prime * hashCode + ((getLineRanges() == null) ? 0 : getLineRanges().hashCode()); hashCode = prime * hashCode + ((getOffsetRanges() == null) ? 0 : getOffsetRanges().hashCode()); hashCode = prime * hashCode + ((getPages() == null) ? 0 : getPages().hashCode()); hashCode = prime * hashCode + ((getRecords() == null) ? 0 : getRecords().hashCode()); return hashCode; } @Override public Occurrences clone() { try { return (Occurrences) 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.OccurrencesMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy