com.amazonaws.services.fsx.model.CompletionReport Maven / Gradle / Ivy
Show all versions of aws-java-sdk-fsx Show documentation
/*
* Copyright 2015-2020 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.fsx.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides a report detailing the data repository task results of the files processed that match the criteria specified
* in the report Scope
parameter. FSx delivers the report to the file system's linked data repository in
* Amazon S3, using the path specified in the report Path
parameter. You can specify whether or not a
* report gets generated for a task using the Enabled
parameter.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CompletionReport implements Serializable, Cloneable, StructuredPojo {
/**
*
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
, Path
,
* and Format
. Set Enabled
to False
if you do not want a
* CompletionReport
generated when the task completes.
*
*/
private Boolean enabled;
/**
*
* Required if Enabled
is set to true
. Specifies the location of the report on the file
* system's linked S3 data repository. An absolute path that defines where the completion report will be stored in
* the destination location. The Path
you provide must be located within the file system’s ExportPath.
* An example Path
value is "s3://myBucket/myExportPath/optionalPrefix". The report provides the
* following information for each file in the report: FilePath, FileStatus, and ErrorCode. To learn more about a
* file system's ExportPath
, see .
*
*/
private String path;
/**
*
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported. When
* Format
is set to REPORT_CSV_20191124
, the CompletionReport
is provided in
* CSV format, and is delivered to {path}/task-{id}/failures.csv
.
*
*/
private String format;
/**
*
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only contains
* information about files that the data repository task failed to process.
*
*/
private String scope;
/**
*
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
, Path
,
* and Format
. Set Enabled
to False
if you do not want a
* CompletionReport
generated when the task completes.
*
*
* @param enabled
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
,
* Path
, and Format
. Set Enabled
to False
if you do not
* want a CompletionReport
generated when the task completes.
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
, Path
,
* and Format
. Set Enabled
to False
if you do not want a
* CompletionReport
generated when the task completes.
*
*
* @return Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
,
* Path
, and Format
. Set Enabled
to False
if you do not
* want a CompletionReport
generated when the task completes.
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
, Path
,
* and Format
. Set Enabled
to False
if you do not want a
* CompletionReport
generated when the task completes.
*
*
* @param enabled
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
,
* Path
, and Format
. Set Enabled
to False
if you do not
* want a CompletionReport
generated when the task completes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CompletionReport withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
, Path
,
* and Format
. Set Enabled
to False
if you do not want a
* CompletionReport
generated when the task completes.
*
*
* @return Set Enabled
to True
to generate a CompletionReport
when the task
* completes. If set to true
, then you need to provide a report Scope
,
* Path
, and Format
. Set Enabled
to False
if you do not
* want a CompletionReport
generated when the task completes.
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
*
* Required if Enabled
is set to true
. Specifies the location of the report on the file
* system's linked S3 data repository. An absolute path that defines where the completion report will be stored in
* the destination location. The Path
you provide must be located within the file system’s ExportPath.
* An example Path
value is "s3://myBucket/myExportPath/optionalPrefix". The report provides the
* following information for each file in the report: FilePath, FileStatus, and ErrorCode. To learn more about a
* file system's ExportPath
, see .
*
*
* @param path
* Required if Enabled
is set to true
. Specifies the location of the report on the
* file system's linked S3 data repository. An absolute path that defines where the completion report will be
* stored in the destination location. The Path
you provide must be located within the file
* system’s ExportPath. An example Path
value is "s3://myBucket/myExportPath/optionalPrefix".
* The report provides the following information for each file in the report: FilePath, FileStatus, and
* ErrorCode. To learn more about a file system's ExportPath
, see .
*/
public void setPath(String path) {
this.path = path;
}
/**
*
* Required if Enabled
is set to true
. Specifies the location of the report on the file
* system's linked S3 data repository. An absolute path that defines where the completion report will be stored in
* the destination location. The Path
you provide must be located within the file system’s ExportPath.
* An example Path
value is "s3://myBucket/myExportPath/optionalPrefix". The report provides the
* following information for each file in the report: FilePath, FileStatus, and ErrorCode. To learn more about a
* file system's ExportPath
, see .
*
*
* @return Required if Enabled
is set to true
. Specifies the location of the report on the
* file system's linked S3 data repository. An absolute path that defines where the completion report will
* be stored in the destination location. The Path
you provide must be located within the file
* system’s ExportPath. An example Path
value is "s3://myBucket/myExportPath/optionalPrefix".
* The report provides the following information for each file in the report: FilePath, FileStatus, and
* ErrorCode. To learn more about a file system's ExportPath
, see .
*/
public String getPath() {
return this.path;
}
/**
*
* Required if Enabled
is set to true
. Specifies the location of the report on the file
* system's linked S3 data repository. An absolute path that defines where the completion report will be stored in
* the destination location. The Path
you provide must be located within the file system’s ExportPath.
* An example Path
value is "s3://myBucket/myExportPath/optionalPrefix". The report provides the
* following information for each file in the report: FilePath, FileStatus, and ErrorCode. To learn more about a
* file system's ExportPath
, see .
*
*
* @param path
* Required if Enabled
is set to true
. Specifies the location of the report on the
* file system's linked S3 data repository. An absolute path that defines where the completion report will be
* stored in the destination location. The Path
you provide must be located within the file
* system’s ExportPath. An example Path
value is "s3://myBucket/myExportPath/optionalPrefix".
* The report provides the following information for each file in the report: FilePath, FileStatus, and
* ErrorCode. To learn more about a file system's ExportPath
, see .
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CompletionReport withPath(String path) {
setPath(path);
return this;
}
/**
*
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported. When
* Format
is set to REPORT_CSV_20191124
, the CompletionReport
is provided in
* CSV format, and is delivered to {path}/task-{id}/failures.csv
.
*
*
* @param format
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported.
* When Format
is set to REPORT_CSV_20191124
, the CompletionReport
is
* provided in CSV format, and is delivered to {path}/task-{id}/failures.csv
.
* @see ReportFormat
*/
public void setFormat(String format) {
this.format = format;
}
/**
*
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported. When
* Format
is set to REPORT_CSV_20191124
, the CompletionReport
is provided in
* CSV format, and is delivered to {path}/task-{id}/failures.csv
.
*
*
* @return Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported.
* When Format
is set to REPORT_CSV_20191124
, the CompletionReport
is
* provided in CSV format, and is delivered to {path}/task-{id}/failures.csv
.
* @see ReportFormat
*/
public String getFormat() {
return this.format;
}
/**
*
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported. When
* Format
is set to REPORT_CSV_20191124
, the CompletionReport
is provided in
* CSV format, and is delivered to {path}/task-{id}/failures.csv
.
*
*
* @param format
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported.
* When Format
is set to REPORT_CSV_20191124
, the CompletionReport
is
* provided in CSV format, and is delivered to {path}/task-{id}/failures.csv
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReportFormat
*/
public CompletionReport withFormat(String format) {
setFormat(format);
return this;
}
/**
*
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported. When
* Format
is set to REPORT_CSV_20191124
, the CompletionReport
is provided in
* CSV format, and is delivered to {path}/task-{id}/failures.csv
.
*
*
* @param format
* Required if Enabled
is set to true
. Specifies the format of the
* CompletionReport
. REPORT_CSV_20191124
is the only format currently supported.
* When Format
is set to REPORT_CSV_20191124
, the CompletionReport
is
* provided in CSV format, and is delivered to {path}/task-{id}/failures.csv
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReportFormat
*/
public CompletionReport withFormat(ReportFormat format) {
this.format = format.toString();
return this;
}
/**
*
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only contains
* information about files that the data repository task failed to process.
*
*
* @param scope
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only
* contains information about files that the data repository task failed to process.
* @see ReportScope
*/
public void setScope(String scope) {
this.scope = scope;
}
/**
*
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only contains
* information about files that the data repository task failed to process.
*
*
* @return Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only
* contains information about files that the data repository task failed to process.
* @see ReportScope
*/
public String getScope() {
return this.scope;
}
/**
*
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only contains
* information about files that the data repository task failed to process.
*
*
* @param scope
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only
* contains information about files that the data repository task failed to process.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReportScope
*/
public CompletionReport withScope(String scope) {
setScope(scope);
return this;
}
/**
*
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only contains
* information about files that the data repository task failed to process.
*
*
* @param scope
* Required if Enabled
is set to true
. Specifies the scope of the
* CompletionReport
; FAILED_FILES_ONLY
is the only scope currently supported. When
* Scope
is set to FAILED_FILES_ONLY
, the CompletionReport
only
* contains information about files that the data repository task failed to process.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReportScope
*/
public CompletionReport withScope(ReportScope scope) {
this.scope = scope.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 (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled()).append(",");
if (getPath() != null)
sb.append("Path: ").append(getPath()).append(",");
if (getFormat() != null)
sb.append("Format: ").append(getFormat()).append(",");
if (getScope() != null)
sb.append("Scope: ").append(getScope());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CompletionReport == false)
return false;
CompletionReport other = (CompletionReport) obj;
if (other.getEnabled() == null ^ this.getEnabled() == null)
return false;
if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false)
return false;
if (other.getPath() == null ^ this.getPath() == null)
return false;
if (other.getPath() != null && other.getPath().equals(this.getPath()) == 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.getScope() == null ^ this.getScope() == null)
return false;
if (other.getScope() != null && other.getScope().equals(this.getScope()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode());
hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode());
hashCode = prime * hashCode + ((getScope() == null) ? 0 : getScope().hashCode());
return hashCode;
}
@Override
public CompletionReport clone() {
try {
return (CompletionReport) 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.fsx.model.transform.CompletionReportMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}