/* * 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; /** *

* Used to specify changes to the ONTAP configuration for the volume you are updating. *

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

* Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath must * have a leading forward slash, such as /vol3. *

*/ private String junctionPath; /** *

* The security style for the volume, which can be UNIX, NTFS, or MIXED. *

*/ private String securityStyle; /** *

* Specifies the size of the volume in megabytes. *

*/ private Integer sizeInMegabytes; /** *

* Default is false. Set to true to enable the deduplication, compression, and compaction storage * efficiency features on the volume. *

*/ private Boolean storageEfficiencyEnabled; /** *

* Update the volume's data tiering policy. *

*/ private TieringPolicy tieringPolicy; /** *

* Specifies the snapshot policy for the volume. There are three built-in snapshot policies: *

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. *

*/ private String snapshotPolicy; /** *

* A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to false. * If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups 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 backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from * the volume, regardless of this value. *

*/ private Boolean copyTagsToBackups; /** *

* The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. *

*/ private UpdateSnaplockConfiguration snaplockConfiguration; /** *

* Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath must * have a leading forward slash, such as /vol3. *

* * @param junctionPath * Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath * must have a leading forward slash, such as /vol3. */ public void setJunctionPath(String junctionPath) { this.junctionPath = junctionPath; } /** *

* Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath must * have a leading forward slash, such as /vol3. *

* * @return Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath * must have a leading forward slash, such as /vol3. */ public String getJunctionPath() { return this.junctionPath; } /** *

* Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath must * have a leading forward slash, such as /vol3. *

* * @param junctionPath * Specifies the location in the SVM's namespace where the volume is mounted. The JunctionPath * must have a leading forward slash, such as /vol3. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateOntapVolumeConfiguration withJunctionPath(String junctionPath) { setJunctionPath(junctionPath); return this; } /** *

* The security style for the volume, which can be UNIX, NTFS, or MIXED. *

* * @param securityStyle * The security style for the volume, which can be UNIX, NTFS, or * MIXED. * @see SecurityStyle */ public void setSecurityStyle(String securityStyle) { this.securityStyle = securityStyle; } /** *

* The security style for the volume, which can be UNIX, NTFS, or MIXED. *

* * @return The security style for the volume, which can be UNIX, NTFS, or * MIXED. * @see SecurityStyle */ public String getSecurityStyle() { return this.securityStyle; } /** *

* The security style for the volume, which can be UNIX, NTFS, or MIXED. *

* * @param securityStyle * The security style for the volume, which can be UNIX, NTFS, or * MIXED. * @return Returns a reference to this object so that method calls can be chained together. * @see SecurityStyle */ public UpdateOntapVolumeConfiguration withSecurityStyle(String securityStyle) { setSecurityStyle(securityStyle); return this; } /** *

* The security style for the volume, which can be UNIX, NTFS, or MIXED. *

* * @param securityStyle * The security style for the volume, which can be UNIX, NTFS, or * MIXED. * @return Returns a reference to this object so that method calls can be chained together. * @see SecurityStyle */ public UpdateOntapVolumeConfiguration withSecurityStyle(SecurityStyle securityStyle) { this.securityStyle = securityStyle.toString(); return this; } /** *

* Specifies the size of the volume in megabytes. *

* * @param sizeInMegabytes * Specifies the size of the volume in megabytes. */ public void setSizeInMegabytes(Integer sizeInMegabytes) { this.sizeInMegabytes = sizeInMegabytes; } /** *

* Specifies the size of the volume in megabytes. *

* * @return Specifies the size of the volume in megabytes. */ public Integer getSizeInMegabytes() { return this.sizeInMegabytes; } /** *

* Specifies the size of the volume in megabytes. *

* * @param sizeInMegabytes * Specifies the size of the volume in megabytes. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateOntapVolumeConfiguration withSizeInMegabytes(Integer sizeInMegabytes) { setSizeInMegabytes(sizeInMegabytes); return this; } /** *

* Default is false. Set to true to enable the deduplication, compression, and compaction storage * efficiency features on the volume. *

* * @param storageEfficiencyEnabled * Default is false. Set to true to enable the deduplication, compression, and compaction * storage efficiency features on the volume. */ public void setStorageEfficiencyEnabled(Boolean storageEfficiencyEnabled) { this.storageEfficiencyEnabled = storageEfficiencyEnabled; } /** *

* Default is false. Set to true to enable the deduplication, compression, and compaction storage * efficiency features on the volume. *

* * @return Default is false. Set to true to enable the deduplication, compression, and compaction * storage efficiency features on the volume. */ public Boolean getStorageEfficiencyEnabled() { return this.storageEfficiencyEnabled; } /** *

* Default is false. Set to true to enable the deduplication, compression, and compaction storage * efficiency features on the volume. *

* * @param storageEfficiencyEnabled * Default is false. Set to true to enable the deduplication, compression, and compaction * storage efficiency features on the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateOntapVolumeConfiguration withStorageEfficiencyEnabled(Boolean storageEfficiencyEnabled) { setStorageEfficiencyEnabled(storageEfficiencyEnabled); return this; } /** *

* Default is false. Set to true to enable the deduplication, compression, and compaction storage * efficiency features on the volume. *

* * @return Default is false. Set to true to enable the deduplication, compression, and compaction * storage efficiency features on the volume. */ public Boolean isStorageEfficiencyEnabled() { return this.storageEfficiencyEnabled; } /** *

* Update the volume's data tiering policy. *

* * @param tieringPolicy * Update the volume's data tiering policy. */ public void setTieringPolicy(TieringPolicy tieringPolicy) { this.tieringPolicy = tieringPolicy; } /** *

* Update the volume's data tiering policy. *

* * @return Update the volume's data tiering policy. */ public TieringPolicy getTieringPolicy() { return this.tieringPolicy; } /** *

* Update the volume's data tiering policy. *

* * @param tieringPolicy * Update the volume's data tiering policy. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateOntapVolumeConfiguration withTieringPolicy(TieringPolicy tieringPolicy) { setTieringPolicy(tieringPolicy); return this; } /** *

* Specifies the snapshot policy for the volume. There are three built-in snapshot policies: *

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. *

* * @param snapshotPolicy * Specifies the snapshot policy for the volume. There are three built-in snapshot policies:

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. */ public void setSnapshotPolicy(String snapshotPolicy) { this.snapshotPolicy = snapshotPolicy; } /** *

* Specifies the snapshot policy for the volume. There are three built-in snapshot policies: *

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. *

* * @return Specifies the snapshot policy for the volume. There are three built-in snapshot policies:

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. */ public String getSnapshotPolicy() { return this.snapshotPolicy; } /** *

* Specifies the snapshot policy for the volume. There are three built-in snapshot policies: *

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. *

* * @param snapshotPolicy * Specifies the snapshot policy for the volume. There are three built-in snapshot policies:

* *

* You can also provide the name of a custom policy that you created with the ONTAP CLI or REST API. *

*

* For more information, see Snapshot * policies in the Amazon FSx for NetApp ONTAP User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateOntapVolumeConfiguration withSnapshotPolicy(String snapshotPolicy) { setSnapshotPolicy(snapshotPolicy); return this; } /** *

* A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to false. * If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups 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 backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from * the volume, regardless of this value. *

* * @param copyTagsToBackups * A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to * false. If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups * 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 backups. If you specify one or more tags when creating a user-initiated * backup, no tags are copied from the volume, regardless of this value. */ public void setCopyTagsToBackups(Boolean copyTagsToBackups) { this.copyTagsToBackups = copyTagsToBackups; } /** *

* A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to false. * If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups 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 backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from * the volume, regardless of this value. *

* * @return A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to * false. If it's set to true, all tags for the volume are copied to all automatic and user-initiated * backups 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 backups. If you specify one or more tags when creating a * user-initiated backup, no tags are copied from the volume, regardless of this value. */ public Boolean getCopyTagsToBackups() { return this.copyTagsToBackups; } /** *

* A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to false. * If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups 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 backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from * the volume, regardless of this value. *

* * @param copyTagsToBackups * A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to * false. If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups * 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 backups. If you specify one or more tags when creating a user-initiated * backup, 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 UpdateOntapVolumeConfiguration withCopyTagsToBackups(Boolean copyTagsToBackups) { setCopyTagsToBackups(copyTagsToBackups); return this; } /** *

* A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to false. * If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups 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 backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from * the volume, regardless of this value. *

* * @return A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to * false. If it's set to true, all tags for the volume are copied to all automatic and user-initiated * backups 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 backups. If you specify one or more tags when creating a * user-initiated backup, no tags are copied from the volume, regardless of this value. */ public Boolean isCopyTagsToBackups() { return this.copyTagsToBackups; } /** *

* The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. *

* * @param snaplockConfiguration * The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. */ public void setSnaplockConfiguration(UpdateSnaplockConfiguration snaplockConfiguration) { this.snaplockConfiguration = snaplockConfiguration; } /** *

* The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. *

* * @return The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. */ public UpdateSnaplockConfiguration getSnaplockConfiguration() { return this.snaplockConfiguration; } /** *

* The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. *

* * @param snaplockConfiguration * The configuration object for updating the SnapLock configuration of an FSx for ONTAP SnapLock volume. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateOntapVolumeConfiguration withSnaplockConfiguration(UpdateSnaplockConfiguration snaplockConfiguration) { setSnaplockConfiguration(snaplockConfiguration); 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 (getJunctionPath() != null) sb.append("JunctionPath: ").append(getJunctionPath()).append(","); if (getSecurityStyle() != null) sb.append("SecurityStyle: ").append(getSecurityStyle()).append(","); if (getSizeInMegabytes() != null) sb.append("SizeInMegabytes: ").append(getSizeInMegabytes()).append(","); if (getStorageEfficiencyEnabled() != null) sb.append("StorageEfficiencyEnabled: ").append(getStorageEfficiencyEnabled()).append(","); if (getTieringPolicy() != null) sb.append("TieringPolicy: ").append(getTieringPolicy()).append(","); if (getSnapshotPolicy() != null) sb.append("SnapshotPolicy: ").append(getSnapshotPolicy()).append(","); if (getCopyTagsToBackups() != null) sb.append("CopyTagsToBackups: ").append(getCopyTagsToBackups()).append(","); if (getSnaplockConfiguration() != null) sb.append("SnaplockConfiguration: ").append(getSnaplockConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateOntapVolumeConfiguration == false) return false; UpdateOntapVolumeConfiguration other = (UpdateOntapVolumeConfiguration) obj; if (other.getJunctionPath() == null ^ this.getJunctionPath() == null) return false; if (other.getJunctionPath() != null && other.getJunctionPath().equals(this.getJunctionPath()) == false) return false; if (other.getSecurityStyle() == null ^ this.getSecurityStyle() == null) return false; if (other.getSecurityStyle() != null && other.getSecurityStyle().equals(this.getSecurityStyle()) == false) return false; if (other.getSizeInMegabytes() == null ^ this.getSizeInMegabytes() == null) return false; if (other.getSizeInMegabytes() != null && other.getSizeInMegabytes().equals(this.getSizeInMegabytes()) == false) return false; if (other.getStorageEfficiencyEnabled() == null ^ this.getStorageEfficiencyEnabled() == null) return false; if (other.getStorageEfficiencyEnabled() != null && other.getStorageEfficiencyEnabled().equals(this.getStorageEfficiencyEnabled()) == false) return false; if (other.getTieringPolicy() == null ^ this.getTieringPolicy() == null) return false; if (other.getTieringPolicy() != null && other.getTieringPolicy().equals(this.getTieringPolicy()) == false) return false; if (other.getSnapshotPolicy() == null ^ this.getSnapshotPolicy() == null) return false; if (other.getSnapshotPolicy() != null && other.getSnapshotPolicy().equals(this.getSnapshotPolicy()) == false) return false; if (other.getCopyTagsToBackups() == null ^ this.getCopyTagsToBackups() == null) return false; if (other.getCopyTagsToBackups() != null && other.getCopyTagsToBackups().equals(this.getCopyTagsToBackups()) == false) return false; if (other.getSnaplockConfiguration() == null ^ this.getSnaplockConfiguration() == null) return false; if (other.getSnaplockConfiguration() != null && other.getSnaplockConfiguration().equals(this.getSnaplockConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJunctionPath() == null) ? 0 : getJunctionPath().hashCode()); hashCode = prime * hashCode + ((getSecurityStyle() == null) ? 0 : getSecurityStyle().hashCode()); hashCode = prime * hashCode + ((getSizeInMegabytes() == null) ? 0 : getSizeInMegabytes().hashCode()); hashCode = prime * hashCode + ((getStorageEfficiencyEnabled() == null) ? 0 : getStorageEfficiencyEnabled().hashCode()); hashCode = prime * hashCode + ((getTieringPolicy() == null) ? 0 : getTieringPolicy().hashCode()); hashCode = prime * hashCode + ((getSnapshotPolicy() == null) ? 0 : getSnapshotPolicy().hashCode()); hashCode = prime * hashCode + ((getCopyTagsToBackups() == null) ? 0 : getCopyTagsToBackups().hashCode()); hashCode = prime * hashCode + ((getSnaplockConfiguration() == null) ? 0 : getSnaplockConfiguration().hashCode()); return hashCode; } @Override public UpdateOntapVolumeConfiguration clone() { try { return (UpdateOntapVolumeConfiguration) 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.UpdateOntapVolumeConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }