/* * 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.fsx.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDataRepositoryTaskRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Specifies the type of data repository task to create. *
*/ private String type; /** ** A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't * valid, the task fails. *
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the
* Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative
* to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported
* to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport
* provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the
* Scope
parameter. For more information, see Working with Task
* Completion Reports.
*
* Specifies the amount of data to release, in GiB, by an Amazon File Cache AUTO_RELEASE_DATA
task that
* automatically releases files from the cache.
*
* Specifies the type of data repository task to create. *
* * @param type * Specifies the type of data repository task to create. * @see DataRepositoryTaskType */ public void setType(String type) { this.type = type; } /** ** Specifies the type of data repository task to create. *
* * @return Specifies the type of data repository task to create. * @see DataRepositoryTaskType */ public String getType() { return this.type; } /** ** Specifies the type of data repository task to create. *
* * @param type * Specifies the type of data repository task to create. * @return Returns a reference to this object so that method calls can be chained together. * @see DataRepositoryTaskType */ public CreateDataRepositoryTaskRequest withType(String type) { setType(type); return this; } /** ** Specifies the type of data repository task to create. *
* * @param type * Specifies the type of data repository task to create. * @return Returns a reference to this object so that method calls can be chained together. * @see DataRepositoryTaskType */ public CreateDataRepositoryTaskRequest withType(DataRepositoryTaskType type) { this.type = type.toString(); return this; } /** ** A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't * valid, the task fails. *
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the
* Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative
* to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported
* to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported
* to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need
* to be relative to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path
* to provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are
* imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't * valid, the task fails. *
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the
* Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative
* to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported
* to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported
* to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to
* be relative to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are
* imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't * valid, the task fails. *
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the
* Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative
* to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported
* to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPaths(java.util.Collection)} or {@link #withPaths(java.util.Collection)} if you want to override the * existing values. *
* * @param paths * A list of paths for the data repository task to use when the task is processed. If a path that you provide * isn't valid, the task fails. *
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported
* to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to
* be relative to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are
* imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't * valid, the task fails. *
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the
* Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative
* to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported
* to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported
* to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to
* be relative to the mount point of the file system. If the mount point is /mnt/fsx
and
* /mnt/fsx/path1
is a directory or file on the file system you want to export, then the path to
* provide is path1
.
*
* For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are
* imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format
* s3://myBucket/myPrefix
(where myPrefix
is optional).
*
* Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport
* provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the
* Scope
parameter. For more information, see Working with Task
* Completion Reports.
*
Scope
parameter. For more information, see Working with Task
* Completion Reports.
*/
public void setReport(CompletionReport report) {
this.report = report;
}
/**
*
* Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport
* provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the
* Scope
parameter. For more information, see Working with Task
* Completion Reports.
*
Scope
parameter. For more information, see Working with Task
* Completion Reports.
*/
public CompletionReport getReport() {
return this.report;
}
/**
*
* Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport
* provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the
* Scope
parameter. For more information, see Working with Task
* Completion Reports.
*
Scope
parameter. For more information, see Working with Task
* Completion Reports.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataRepositoryTaskRequest withReport(CompletionReport report) {
setReport(report);
return this;
}
/**
* @param clientRequestToken
*/
public void setClientRequestToken(String clientRequestToken) {
this.clientRequestToken = clientRequestToken;
}
/**
* @return
*/
public String getClientRequestToken() {
return this.clientRequestToken;
}
/**
* @param clientRequestToken
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataRepositoryTaskRequest withClientRequestToken(String clientRequestToken) {
setClientRequestToken(clientRequestToken);
return this;
}
/**
* @return
*/
public java.util.List* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataRepositoryTaskRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList
* Specifies the amount of data to release, in GiB, by an Amazon File Cache AUTO_RELEASE_DATA
task that
* automatically releases files from the cache.
*
AUTO_RELEASE_DATA
* task that automatically releases files from the cache.
*/
public void setCapacityToRelease(Long capacityToRelease) {
this.capacityToRelease = capacityToRelease;
}
/**
*
* Specifies the amount of data to release, in GiB, by an Amazon File Cache AUTO_RELEASE_DATA
task that
* automatically releases files from the cache.
*
AUTO_RELEASE_DATA
* task that automatically releases files from the cache.
*/
public Long getCapacityToRelease() {
return this.capacityToRelease;
}
/**
*
* Specifies the amount of data to release, in GiB, by an Amazon File Cache AUTO_RELEASE_DATA
task that
* automatically releases files from the cache.
*
AUTO_RELEASE_DATA
* task that automatically releases files from the cache.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataRepositoryTaskRequest withCapacityToRelease(Long capacityToRelease) {
setCapacityToRelease(capacityToRelease);
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 (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getPaths() != null)
sb.append("Paths: ").append(getPaths()).append(",");
if (getFileSystemId() != null)
sb.append("FileSystemId: ").append(getFileSystemId()).append(",");
if (getReport() != null)
sb.append("Report: ").append(getReport()).append(",");
if (getClientRequestToken() != null)
sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getCapacityToRelease() != null)
sb.append("CapacityToRelease: ").append(getCapacityToRelease());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDataRepositoryTaskRequest == false)
return false;
CreateDataRepositoryTaskRequest other = (CreateDataRepositoryTaskRequest) obj;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getPaths() == null ^ this.getPaths() == null)
return false;
if (other.getPaths() != null && other.getPaths().equals(this.getPaths()) == false)
return false;
if (other.getFileSystemId() == null ^ this.getFileSystemId() == null)
return false;
if (other.getFileSystemId() != null && other.getFileSystemId().equals(this.getFileSystemId()) == false)
return false;
if (other.getReport() == null ^ this.getReport() == null)
return false;
if (other.getReport() != null && other.getReport().equals(this.getReport()) == false)
return false;
if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null)
return false;
if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getCapacityToRelease() == null ^ this.getCapacityToRelease() == null)
return false;
if (other.getCapacityToRelease() != null && other.getCapacityToRelease().equals(this.getCapacityToRelease()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getPaths() == null) ? 0 : getPaths().hashCode());
hashCode = prime * hashCode + ((getFileSystemId() == null) ? 0 : getFileSystemId().hashCode());
hashCode = prime * hashCode + ((getReport() == null) ? 0 : getReport().hashCode());
hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getCapacityToRelease() == null) ? 0 : getCapacityToRelease().hashCode());
return hashCode;
}
@Override
public CreateDataRepositoryTaskRequest clone() {
return (CreateDataRepositoryTaskRequest) super.clone();
}
}