com.amazonaws.services.fsx.model.FileCacheDataRepositoryAssociation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-fsx Show documentation
/*
* Copyright 2019-2024 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;
/**
*
* The configuration for a data repository association (DRA) to be created during the Amazon File Cache resource
* creation. The DRA links the cache to either an Amazon S3 bucket or prefix, or a Network File System (NFS) data
* repository that supports the NFSv3 protocol.
*
*
* The DRA does not support automatic import or automatic export.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FileCacheDataRepositoryAssociation implements Serializable, Cloneable, StructuredPojo {
/**
*
* A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory (such as
* /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The leading forward
* slash in the name is required. Two data repository associations cannot have overlapping cache paths. For example,
* if a data repository is associated with cache path /ns1/
, then you cannot link another data
* repository with cache path /ns1/ns2
.
*
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked to only
* one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
is
* specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
*
*/
private String fileCachePath;
/**
*
* The path to the S3 or NFS data repository that links to the cache. You must provide one of the following paths:
*
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS Export
* directory (or one of its subdirectories) in the format nsf://nfs-domain-name/exportpath
. You can
* therefore link a single NFS Export to a single data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of the NFS
* file system in the format nfs://filer-domain-name
, which indicates the root of the subdirectories
* specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
*
*/
private String dataRepositoryPath;
/**
*
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in the
* format /exportpath1
. To use this parameter, you must configure DataRepositoryPath
as
* the domain name of the NFS file system. The NFS file system domain name in effect is the root of the
* subdirectories. Note that DataRepositorySubdirectories
is not supported for S3 data repositories.
*
*/
private java.util.List dataRepositorySubdirectories;
/**
*
* The configuration for a data repository association that links an Amazon File Cache resource to an NFS data
* repository.
*
*/
private FileCacheNFSConfiguration nFS;
/**
*
* A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory (such as
* /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The leading forward
* slash in the name is required. Two data repository associations cannot have overlapping cache paths. For example,
* if a data repository is associated with cache path /ns1/
, then you cannot link another data
* repository with cache path /ns1/ns2
.
*
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked to only
* one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
is
* specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
*
*
* @param fileCachePath
* A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory
* (such as /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The
* leading forward slash in the name is required. Two data repository associations cannot have overlapping
* cache paths. For example, if a data repository is associated with cache path /ns1/
, then you
* cannot link another data repository with cache path /ns1/ns2
.
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked to
* only one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
is
* specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
*/
public void setFileCachePath(String fileCachePath) {
this.fileCachePath = fileCachePath;
}
/**
*
* A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory (such as
* /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The leading forward
* slash in the name is required. Two data repository associations cannot have overlapping cache paths. For example,
* if a data repository is associated with cache path /ns1/
, then you cannot link another data
* repository with cache path /ns1/ns2
.
*
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked to only
* one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
is
* specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
*
*
* @return A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory
* (such as /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The
* leading forward slash in the name is required. Two data repository associations cannot have overlapping
* cache paths. For example, if a data repository is associated with cache path /ns1/
, then you
* cannot link another data repository with cache path /ns1/ns2
.
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked
* to only one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
* is specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
*/
public String getFileCachePath() {
return this.fileCachePath;
}
/**
*
* A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory (such as
* /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The leading forward
* slash in the name is required. Two data repository associations cannot have overlapping cache paths. For example,
* if a data repository is associated with cache path /ns1/
, then you cannot link another data
* repository with cache path /ns1/ns2
.
*
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked to only
* one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
is
* specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
*
*
* @param fileCachePath
* A path on the cache that points to a high-level directory (such as /ns1/
) or subdirectory
* (such as /ns1/subdir/
) that will be mapped 1-1 with DataRepositoryPath
. The
* leading forward slash in the name is required. Two data repository associations cannot have overlapping
* cache paths. For example, if a data repository is associated with cache path /ns1/
, then you
* cannot link another data repository with cache path /ns1/ns2
.
*
* This path specifies where in your cache files will be exported from. This cache directory can be linked to
* only one data repository, and no data repository other can be linked to the directory.
*
*
*
* The cache path can only be set to root (/) on an NFS DRA when DataRepositorySubdirectories
is
* specified. If you specify root (/) as the cache path, you can create only one DRA on the cache.
*
*
* The cache path cannot be set to root (/) for an S3 DRA.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileCacheDataRepositoryAssociation withFileCachePath(String fileCachePath) {
setFileCachePath(fileCachePath);
return this;
}
/**
*
* The path to the S3 or NFS data repository that links to the cache. You must provide one of the following paths:
*
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS Export
* directory (or one of its subdirectories) in the format nsf://nfs-domain-name/exportpath
. You can
* therefore link a single NFS Export to a single data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of the NFS
* file system in the format nfs://filer-domain-name
, which indicates the root of the subdirectories
* specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
*
*
* @param dataRepositoryPath
* The path to the S3 or NFS data repository that links to the cache. You must provide one of the following
* paths:
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS Export
* directory (or one of its subdirectories) in the format nsf://nfs-domain-name/exportpath
. You
* can therefore link a single NFS Export to a single data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of
* the NFS file system in the format nfs://filer-domain-name
, which indicates the root of the
* subdirectories specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
*/
public void setDataRepositoryPath(String dataRepositoryPath) {
this.dataRepositoryPath = dataRepositoryPath;
}
/**
*
* The path to the S3 or NFS data repository that links to the cache. You must provide one of the following paths:
*
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS Export
* directory (or one of its subdirectories) in the format nsf://nfs-domain-name/exportpath
. You can
* therefore link a single NFS Export to a single data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of the NFS
* file system in the format nfs://filer-domain-name
, which indicates the root of the subdirectories
* specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
*
*
* @return The path to the S3 or NFS data repository that links to the cache. You must provide one of the following
* paths:
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS
* Export directory (or one of its subdirectories) in the format
* nsf://nfs-domain-name/exportpath
. You can therefore link a single NFS Export to a single
* data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of
* the NFS file system in the format nfs://filer-domain-name
, which indicates the root of the
* subdirectories specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
*/
public String getDataRepositoryPath() {
return this.dataRepositoryPath;
}
/**
*
* The path to the S3 or NFS data repository that links to the cache. You must provide one of the following paths:
*
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS Export
* directory (or one of its subdirectories) in the format nsf://nfs-domain-name/exportpath
. You can
* therefore link a single NFS Export to a single data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of the NFS
* file system in the format nfs://filer-domain-name
, which indicates the root of the subdirectories
* specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
*
*
* @param dataRepositoryPath
* The path to the S3 or NFS data repository that links to the cache. You must provide one of the following
* paths:
*
* -
*
* The path can be an NFS data repository that links to the cache. The path can be in one of two formats:
*
*
* -
*
* If you are not using the DataRepositorySubdirectories
parameter, the path is to an NFS Export
* directory (or one of its subdirectories) in the format nsf://nfs-domain-name/exportpath
. You
* can therefore link a single NFS Export to a single data repository association.
*
*
* -
*
* If you are using the DataRepositorySubdirectories
parameter, the path is the domain name of
* the NFS file system in the format nfs://filer-domain-name
, which indicates the root of the
* subdirectories specified with the DataRepositorySubdirectories
parameter.
*
*
*
*
* -
*
* The path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix/
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileCacheDataRepositoryAssociation withDataRepositoryPath(String dataRepositoryPath) {
setDataRepositoryPath(dataRepositoryPath);
return this;
}
/**
*
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in the
* format /exportpath1
. To use this parameter, you must configure DataRepositoryPath
as
* the domain name of the NFS file system. The NFS file system domain name in effect is the root of the
* subdirectories. Note that DataRepositorySubdirectories
is not supported for S3 data repositories.
*
*
* @return A list of NFS Exports that will be linked with this data repository association. The Export paths are in
* the format /exportpath1
. To use this parameter, you must configure
* DataRepositoryPath
as the domain name of the NFS file system. The NFS file system domain
* name in effect is the root of the subdirectories. Note that DataRepositorySubdirectories
is
* not supported for S3 data repositories.
*/
public java.util.List getDataRepositorySubdirectories() {
return dataRepositorySubdirectories;
}
/**
*
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in the
* format /exportpath1
. To use this parameter, you must configure DataRepositoryPath
as
* the domain name of the NFS file system. The NFS file system domain name in effect is the root of the
* subdirectories. Note that DataRepositorySubdirectories
is not supported for S3 data repositories.
*
*
* @param dataRepositorySubdirectories
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in
* the format /exportpath1
. To use this parameter, you must configure
* DataRepositoryPath
as the domain name of the NFS file system. The NFS file system domain name
* in effect is the root of the subdirectories. Note that DataRepositorySubdirectories
is not
* supported for S3 data repositories.
*/
public void setDataRepositorySubdirectories(java.util.Collection dataRepositorySubdirectories) {
if (dataRepositorySubdirectories == null) {
this.dataRepositorySubdirectories = null;
return;
}
this.dataRepositorySubdirectories = new java.util.ArrayList(dataRepositorySubdirectories);
}
/**
*
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in the
* format /exportpath1
. To use this parameter, you must configure DataRepositoryPath
as
* the domain name of the NFS file system. The NFS file system domain name in effect is the root of the
* subdirectories. Note that DataRepositorySubdirectories
is not supported for S3 data repositories.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDataRepositorySubdirectories(java.util.Collection)} or
* {@link #withDataRepositorySubdirectories(java.util.Collection)} if you want to override the existing values.
*
*
* @param dataRepositorySubdirectories
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in
* the format /exportpath1
. To use this parameter, you must configure
* DataRepositoryPath
as the domain name of the NFS file system. The NFS file system domain name
* in effect is the root of the subdirectories. Note that DataRepositorySubdirectories
is not
* supported for S3 data repositories.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileCacheDataRepositoryAssociation withDataRepositorySubdirectories(String... dataRepositorySubdirectories) {
if (this.dataRepositorySubdirectories == null) {
setDataRepositorySubdirectories(new java.util.ArrayList(dataRepositorySubdirectories.length));
}
for (String ele : dataRepositorySubdirectories) {
this.dataRepositorySubdirectories.add(ele);
}
return this;
}
/**
*
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in the
* format /exportpath1
. To use this parameter, you must configure DataRepositoryPath
as
* the domain name of the NFS file system. The NFS file system domain name in effect is the root of the
* subdirectories. Note that DataRepositorySubdirectories
is not supported for S3 data repositories.
*
*
* @param dataRepositorySubdirectories
* A list of NFS Exports that will be linked with this data repository association. The Export paths are in
* the format /exportpath1
. To use this parameter, you must configure
* DataRepositoryPath
as the domain name of the NFS file system. The NFS file system domain name
* in effect is the root of the subdirectories. Note that DataRepositorySubdirectories
is not
* supported for S3 data repositories.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileCacheDataRepositoryAssociation withDataRepositorySubdirectories(java.util.Collection dataRepositorySubdirectories) {
setDataRepositorySubdirectories(dataRepositorySubdirectories);
return this;
}
/**
*
* The configuration for a data repository association that links an Amazon File Cache resource to an NFS data
* repository.
*
*
* @param nFS
* The configuration for a data repository association that links an Amazon File Cache resource to an NFS
* data repository.
*/
public void setNFS(FileCacheNFSConfiguration nFS) {
this.nFS = nFS;
}
/**
*
* The configuration for a data repository association that links an Amazon File Cache resource to an NFS data
* repository.
*
*
* @return The configuration for a data repository association that links an Amazon File Cache resource to an NFS
* data repository.
*/
public FileCacheNFSConfiguration getNFS() {
return this.nFS;
}
/**
*
* The configuration for a data repository association that links an Amazon File Cache resource to an NFS data
* repository.
*
*
* @param nFS
* The configuration for a data repository association that links an Amazon File Cache resource to an NFS
* data repository.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileCacheDataRepositoryAssociation withNFS(FileCacheNFSConfiguration nFS) {
setNFS(nFS);
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 (getFileCachePath() != null)
sb.append("FileCachePath: ").append(getFileCachePath()).append(",");
if (getDataRepositoryPath() != null)
sb.append("DataRepositoryPath: ").append(getDataRepositoryPath()).append(",");
if (getDataRepositorySubdirectories() != null)
sb.append("DataRepositorySubdirectories: ").append(getDataRepositorySubdirectories()).append(",");
if (getNFS() != null)
sb.append("NFS: ").append(getNFS());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FileCacheDataRepositoryAssociation == false)
return false;
FileCacheDataRepositoryAssociation other = (FileCacheDataRepositoryAssociation) obj;
if (other.getFileCachePath() == null ^ this.getFileCachePath() == null)
return false;
if (other.getFileCachePath() != null && other.getFileCachePath().equals(this.getFileCachePath()) == false)
return false;
if (other.getDataRepositoryPath() == null ^ this.getDataRepositoryPath() == null)
return false;
if (other.getDataRepositoryPath() != null && other.getDataRepositoryPath().equals(this.getDataRepositoryPath()) == false)
return false;
if (other.getDataRepositorySubdirectories() == null ^ this.getDataRepositorySubdirectories() == null)
return false;
if (other.getDataRepositorySubdirectories() != null && other.getDataRepositorySubdirectories().equals(this.getDataRepositorySubdirectories()) == false)
return false;
if (other.getNFS() == null ^ this.getNFS() == null)
return false;
if (other.getNFS() != null && other.getNFS().equals(this.getNFS()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFileCachePath() == null) ? 0 : getFileCachePath().hashCode());
hashCode = prime * hashCode + ((getDataRepositoryPath() == null) ? 0 : getDataRepositoryPath().hashCode());
hashCode = prime * hashCode + ((getDataRepositorySubdirectories() == null) ? 0 : getDataRepositorySubdirectories().hashCode());
hashCode = prime * hashCode + ((getNFS() == null) ? 0 : getNFS().hashCode());
return hashCode;
}
@Override
public FileCacheDataRepositoryAssociation clone() {
try {
return (FileCacheDataRepositoryAssociation) 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.FileCacheDataRepositoryAssociationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}