/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The configuration of an Amazon FSx for OpenZFS root volume. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OpenZFSCreateRootVolumeConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, * 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. Database * workflows can benefit from a smaller record size, while streaming workflows can benefit from a larger record * size. For additional guidance on setting a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. *
*/ private Integer recordSizeKiB; /** *
* Specifies the method used to compress the data on the volume. The compression type is NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared
* to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard,
* LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
* The configuration object for mounting a file system. *
*/ private java.util.List* An object specifying how much storage users or groups can use on the volume. *
*/ private java.util.List
* A Boolean value indicating whether tags for the volume should be copied to snapshots of the volume. This value
* defaults to false
. If it's set to true
, all tags for the volume are copied to snapshots
* where the user doesn't specify tags. If this value is true
and you specify one or more tags, only
* the specified tags are copied to snapshots. If you specify one or more tags when creating the snapshot, no tags
* are copied from the volume, regardless of this value.
*
* A Boolean value indicating whether the volume is read-only. Setting this value to true
can be useful
* after you have completed changes to a volume and no longer want changes to occur.
*
* Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, * 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. Database * workflows can benefit from a smaller record size, while streaming workflows can benefit from a larger record * size. For additional guidance on setting a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. *
* * @param recordSizeKiB * Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, * 64, 128, 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. * Database workflows can benefit from a smaller record size, while streaming workflows can benefit from a * larger record size. For additional guidance on setting a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. */ public void setRecordSizeKiB(Integer recordSizeKiB) { this.recordSizeKiB = recordSizeKiB; } /** ** Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, * 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. Database * workflows can benefit from a smaller record size, while streaming workflows can benefit from a larger record * size. For additional guidance on setting a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. *
* * @return Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, * 64, 128, 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record * size. Database workflows can benefit from a smaller record size, while streaming workflows can benefit * from a larger record size. For additional guidance on setting a custom record size, see Tips * for maximizing performance in the Amazon FSx for OpenZFS User Guide. */ public Integer getRecordSizeKiB() { return this.recordSizeKiB; } /** ** Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, 64, 128, * 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. Database * workflows can benefit from a smaller record size, while streaming workflows can benefit from a larger record * size. For additional guidance on setting a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. *
* * @param recordSizeKiB * Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are 4, 8, 16, 32, * 64, 128, 256, 512, or 1024 KiB. The default is 128 KiB. Most workloads should use the default record size. * Database workflows can benefit from a smaller record size, while streaming workflows can benefit from a * larger record size. For additional guidance on setting a custom record size, see Tips for * maximizing performance in the Amazon FSx for OpenZFS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public OpenZFSCreateRootVolumeConfiguration withRecordSizeKiB(Integer recordSizeKiB) { setRecordSizeKiB(recordSizeKiB); return this; } /** *
* Specifies the method used to compress the data on the volume. The compression type is NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared
* to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard,
* LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm.
* Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to
* Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
* Specifies the method used to compress the data on the volume. The compression type is NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared
* to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard,
* LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
NONE
* by default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm.
* Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to
* Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
* Specifies the method used to compress the data on the volume. The compression type is NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared
* to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard,
* LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm.
* Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to
* Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
* Specifies the method used to compress the data on the volume. The compression type is NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. Compared
* to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to Z-Standard,
* LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
NONE
by
* default.
*
* NONE
- Doesn't compress the data on the volume. NONE
is the default.
*
* ZSTD
- Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm.
* Compared to LZ4, Z-Standard provides a better compression ratio to minimize on-disk storage utilization.
*
* LZ4
- Compresses the data in the volume using the LZ4 compression algorithm. Compared to
* Z-Standard, LZ4 is less compute-intensive and delivers higher write throughput speeds.
*
* The configuration object for mounting a file system. *
* * @return The configuration object for mounting a file system. */ public java.util.List* The configuration object for mounting a file system. *
* * @param nfsExports * The configuration object for mounting a file system. */ public void setNfsExports(java.util.Collection* The configuration object for mounting a file system. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setNfsExports(java.util.Collection)} or {@link #withNfsExports(java.util.Collection)} if you want to * override the existing values. *
* * @param nfsExports * The configuration object for mounting a file system. * @return Returns a reference to this object so that method calls can be chained together. */ public OpenZFSCreateRootVolumeConfiguration withNfsExports(OpenZFSNfsExport... nfsExports) { if (this.nfsExports == null) { setNfsExports(new java.util.ArrayList* The configuration object for mounting a file system. *
* * @param nfsExports * The configuration object for mounting a file system. * @return Returns a reference to this object so that method calls can be chained together. */ public OpenZFSCreateRootVolumeConfiguration withNfsExports(java.util.Collection* An object specifying how much storage users or groups can use on the volume. *
* * @return An object specifying how much storage users or groups can use on the volume. */ public java.util.List* An object specifying how much storage users or groups can use on the volume. *
* * @param userAndGroupQuotas * An object specifying how much storage users or groups can use on the volume. */ public void setUserAndGroupQuotas(java.util.Collection* An object specifying how much storage users or groups can use on the volume. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setUserAndGroupQuotas(java.util.Collection)} or {@link #withUserAndGroupQuotas(java.util.Collection)} if * you want to override the existing values. *
* * @param userAndGroupQuotas * An object specifying how much storage users or groups can use on the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public OpenZFSCreateRootVolumeConfiguration withUserAndGroupQuotas(OpenZFSUserOrGroupQuota... userAndGroupQuotas) { if (this.userAndGroupQuotas == null) { setUserAndGroupQuotas(new java.util.ArrayList* An object specifying how much storage users or groups can use on the volume. *
* * @param userAndGroupQuotas * An object specifying how much storage users or groups can use on the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public OpenZFSCreateRootVolumeConfiguration withUserAndGroupQuotas(java.util.Collection
* A Boolean value indicating whether tags for the volume should be copied to snapshots of the volume. This value
* defaults to false
. If it's set to true
, all tags for the volume are copied to snapshots
* where the user doesn't specify tags. If this value is true
and you specify one or more tags, only
* the specified tags are copied to snapshots. If you specify one or more tags when creating the snapshot, no tags
* are copied from the volume, regardless of this value.
*
false
. If it's set to true
, all tags for the volume are copied
* to snapshots where the user doesn't specify tags. If this value is true
and you specify one
* or more tags, only the specified tags are copied to snapshots. If you specify one or more tags when
* creating the snapshot, no tags are copied from the volume, regardless of this value.
*/
public void setCopyTagsToSnapshots(Boolean copyTagsToSnapshots) {
this.copyTagsToSnapshots = copyTagsToSnapshots;
}
/**
*
* A Boolean value indicating whether tags for the volume should be copied to snapshots of the volume. This value
* defaults to false
. If it's set to true
, all tags for the volume are copied to snapshots
* where the user doesn't specify tags. If this value is true
and you specify one or more tags, only
* the specified tags are copied to snapshots. If you specify one or more tags when creating the snapshot, no tags
* are copied from the volume, regardless of this value.
*
false
. If it's set to true
, all tags for the volume are
* copied to snapshots where the user doesn't specify tags. If this value is true
and you
* specify one or more tags, only the specified tags are copied to snapshots. If you specify one or more
* tags when creating the snapshot, no tags are copied from the volume, regardless of this value.
*/
public Boolean getCopyTagsToSnapshots() {
return this.copyTagsToSnapshots;
}
/**
*
* A Boolean value indicating whether tags for the volume should be copied to snapshots of the volume. This value
* defaults to false
. If it's set to true
, all tags for the volume are copied to snapshots
* where the user doesn't specify tags. If this value is true
and you specify one or more tags, only
* the specified tags are copied to snapshots. If you specify one or more tags when creating the snapshot, no tags
* are copied from the volume, regardless of this value.
*
false
. If it's set to true
, all tags for the volume are copied
* to snapshots where the user doesn't specify tags. If this value is true
and you specify one
* or more tags, only the specified tags are copied to snapshots. If you specify one or more tags when
* creating the snapshot, no tags are copied from the volume, regardless of this value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpenZFSCreateRootVolumeConfiguration withCopyTagsToSnapshots(Boolean copyTagsToSnapshots) {
setCopyTagsToSnapshots(copyTagsToSnapshots);
return this;
}
/**
*
* A Boolean value indicating whether tags for the volume should be copied to snapshots of the volume. This value
* defaults to false
. If it's set to true
, all tags for the volume are copied to snapshots
* where the user doesn't specify tags. If this value is true
and you specify one or more tags, only
* the specified tags are copied to snapshots. If you specify one or more tags when creating the snapshot, no tags
* are copied from the volume, regardless of this value.
*
false
. If it's set to true
, all tags for the volume are
* copied to snapshots where the user doesn't specify tags. If this value is true
and you
* specify one or more tags, only the specified tags are copied to snapshots. If you specify one or more
* tags when creating the snapshot, no tags are copied from the volume, regardless of this value.
*/
public Boolean isCopyTagsToSnapshots() {
return this.copyTagsToSnapshots;
}
/**
*
* A Boolean value indicating whether the volume is read-only. Setting this value to true
can be useful
* after you have completed changes to a volume and no longer want changes to occur.
*
true
can be
* useful after you have completed changes to a volume and no longer want changes to occur.
*/
public void setReadOnly(Boolean readOnly) {
this.readOnly = readOnly;
}
/**
*
* A Boolean value indicating whether the volume is read-only. Setting this value to true
can be useful
* after you have completed changes to a volume and no longer want changes to occur.
*
true
can
* be useful after you have completed changes to a volume and no longer want changes to occur.
*/
public Boolean getReadOnly() {
return this.readOnly;
}
/**
*
* A Boolean value indicating whether the volume is read-only. Setting this value to true
can be useful
* after you have completed changes to a volume and no longer want changes to occur.
*
true
can be
* useful after you have completed changes to a volume and no longer want changes to occur.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpenZFSCreateRootVolumeConfiguration withReadOnly(Boolean readOnly) {
setReadOnly(readOnly);
return this;
}
/**
*
* A Boolean value indicating whether the volume is read-only. Setting this value to true
can be useful
* after you have completed changes to a volume and no longer want changes to occur.
*
true
can
* be useful after you have completed changes to a volume and no longer want changes to occur.
*/
public Boolean isReadOnly() {
return this.readOnly;
}
/**
* 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 (getRecordSizeKiB() != null)
sb.append("RecordSizeKiB: ").append(getRecordSizeKiB()).append(",");
if (getDataCompressionType() != null)
sb.append("DataCompressionType: ").append(getDataCompressionType()).append(",");
if (getNfsExports() != null)
sb.append("NfsExports: ").append(getNfsExports()).append(",");
if (getUserAndGroupQuotas() != null)
sb.append("UserAndGroupQuotas: ").append(getUserAndGroupQuotas()).append(",");
if (getCopyTagsToSnapshots() != null)
sb.append("CopyTagsToSnapshots: ").append(getCopyTagsToSnapshots()).append(",");
if (getReadOnly() != null)
sb.append("ReadOnly: ").append(getReadOnly());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OpenZFSCreateRootVolumeConfiguration == false)
return false;
OpenZFSCreateRootVolumeConfiguration other = (OpenZFSCreateRootVolumeConfiguration) obj;
if (other.getRecordSizeKiB() == null ^ this.getRecordSizeKiB() == null)
return false;
if (other.getRecordSizeKiB() != null && other.getRecordSizeKiB().equals(this.getRecordSizeKiB()) == false)
return false;
if (other.getDataCompressionType() == null ^ this.getDataCompressionType() == null)
return false;
if (other.getDataCompressionType() != null && other.getDataCompressionType().equals(this.getDataCompressionType()) == false)
return false;
if (other.getNfsExports() == null ^ this.getNfsExports() == null)
return false;
if (other.getNfsExports() != null && other.getNfsExports().equals(this.getNfsExports()) == false)
return false;
if (other.getUserAndGroupQuotas() == null ^ this.getUserAndGroupQuotas() == null)
return false;
if (other.getUserAndGroupQuotas() != null && other.getUserAndGroupQuotas().equals(this.getUserAndGroupQuotas()) == false)
return false;
if (other.getCopyTagsToSnapshots() == null ^ this.getCopyTagsToSnapshots() == null)
return false;
if (other.getCopyTagsToSnapshots() != null && other.getCopyTagsToSnapshots().equals(this.getCopyTagsToSnapshots()) == false)
return false;
if (other.getReadOnly() == null ^ this.getReadOnly() == null)
return false;
if (other.getReadOnly() != null && other.getReadOnly().equals(this.getReadOnly()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRecordSizeKiB() == null) ? 0 : getRecordSizeKiB().hashCode());
hashCode = prime * hashCode + ((getDataCompressionType() == null) ? 0 : getDataCompressionType().hashCode());
hashCode = prime * hashCode + ((getNfsExports() == null) ? 0 : getNfsExports().hashCode());
hashCode = prime * hashCode + ((getUserAndGroupQuotas() == null) ? 0 : getUserAndGroupQuotas().hashCode());
hashCode = prime * hashCode + ((getCopyTagsToSnapshots() == null) ? 0 : getCopyTagsToSnapshots().hashCode());
hashCode = prime * hashCode + ((getReadOnly() == null) ? 0 : getReadOnly().hashCode());
return hashCode;
}
@Override
public OpenZFSCreateRootVolumeConfiguration clone() {
try {
return (OpenZFSCreateRootVolumeConfiguration) 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.OpenZFSCreateRootVolumeConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}