/* * 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.mainframemodernization.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* The attributes of a VSAM type data set. *

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

* The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if those * alternate keys definitions exist, provide them as some applications will make use of them. *

*/ private java.util.List alternateKeys; /** *

* Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. *

*/ private Boolean compressed; /** *

* The character set used by the data set. Can be ASCII, EBCDIC, or unknown. *

*/ private String encoding; /** *

* The record format of the data set. *

*/ private String format; /** *

* The primary key of the data set. *

*/ private PrimaryKey primaryKey; /** *

* The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if those * alternate keys definitions exist, provide them as some applications will make use of them. *

* * @return The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if * those alternate keys definitions exist, provide them as some applications will make use of them. */ public java.util.List getAlternateKeys() { return alternateKeys; } /** *

* The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if those * alternate keys definitions exist, provide them as some applications will make use of them. *

* * @param alternateKeys * The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if * those alternate keys definitions exist, provide them as some applications will make use of them. */ public void setAlternateKeys(java.util.Collection alternateKeys) { if (alternateKeys == null) { this.alternateKeys = null; return; } this.alternateKeys = new java.util.ArrayList(alternateKeys); } /** *

* The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if those * alternate keys definitions exist, provide them as some applications will make use of them. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAlternateKeys(java.util.Collection)} or {@link #withAlternateKeys(java.util.Collection)} if you want * to override the existing values. *

* * @param alternateKeys * The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if * those alternate keys definitions exist, provide them as some applications will make use of them. * @return Returns a reference to this object so that method calls can be chained together. */ public VsamAttributes withAlternateKeys(AlternateKey... alternateKeys) { if (this.alternateKeys == null) { setAlternateKeys(new java.util.ArrayList(alternateKeys.length)); } for (AlternateKey ele : alternateKeys) { this.alternateKeys.add(ele); } return this; } /** *

* The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if those * alternate keys definitions exist, provide them as some applications will make use of them. *

* * @param alternateKeys * The alternate key definitions, if any. A legacy dataset might not have any alternate key defined, but if * those alternate keys definitions exist, provide them as some applications will make use of them. * @return Returns a reference to this object so that method calls can be chained together. */ public VsamAttributes withAlternateKeys(java.util.Collection alternateKeys) { setAlternateKeys(alternateKeys); return this; } /** *

* Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. *

* * @param compressed * Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. */ public void setCompressed(Boolean compressed) { this.compressed = compressed; } /** *

* Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. *

* * @return Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. */ public Boolean getCompressed() { return this.compressed; } /** *

* Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. *

* * @param compressed * Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. * @return Returns a reference to this object so that method calls can be chained together. */ public VsamAttributes withCompressed(Boolean compressed) { setCompressed(compressed); return this; } /** *

* Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. *

* * @return Indicates whether indexes for this dataset are stored as compressed values. If you have a large data set * (typically > 100 Mb), consider setting this flag to True. */ public Boolean isCompressed() { return this.compressed; } /** *

* The character set used by the data set. Can be ASCII, EBCDIC, or unknown. *

* * @param encoding * The character set used by the data set. Can be ASCII, EBCDIC, or unknown. */ public void setEncoding(String encoding) { this.encoding = encoding; } /** *

* The character set used by the data set. Can be ASCII, EBCDIC, or unknown. *

* * @return The character set used by the data set. Can be ASCII, EBCDIC, or unknown. */ public String getEncoding() { return this.encoding; } /** *

* The character set used by the data set. Can be ASCII, EBCDIC, or unknown. *

* * @param encoding * The character set used by the data set. Can be ASCII, EBCDIC, or unknown. * @return Returns a reference to this object so that method calls can be chained together. */ public VsamAttributes withEncoding(String encoding) { setEncoding(encoding); return this; } /** *

* The record format of the data set. *

* * @param format * The record format of the data set. */ public void setFormat(String format) { this.format = format; } /** *

* The record format of the data set. *

* * @return The record format of the data set. */ public String getFormat() { return this.format; } /** *

* The record format of the data set. *

* * @param format * The record format of the data set. * @return Returns a reference to this object so that method calls can be chained together. */ public VsamAttributes withFormat(String format) { setFormat(format); return this; } /** *

* The primary key of the data set. *

* * @param primaryKey * The primary key of the data set. */ public void setPrimaryKey(PrimaryKey primaryKey) { this.primaryKey = primaryKey; } /** *

* The primary key of the data set. *

* * @return The primary key of the data set. */ public PrimaryKey getPrimaryKey() { return this.primaryKey; } /** *

* The primary key of the data set. *

* * @param primaryKey * The primary key of the data set. * @return Returns a reference to this object so that method calls can be chained together. */ public VsamAttributes withPrimaryKey(PrimaryKey primaryKey) { setPrimaryKey(primaryKey); 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 (getAlternateKeys() != null) sb.append("AlternateKeys: ").append(getAlternateKeys()).append(","); if (getCompressed() != null) sb.append("Compressed: ").append(getCompressed()).append(","); if (getEncoding() != null) sb.append("Encoding: ").append(getEncoding()).append(","); if (getFormat() != null) sb.append("Format: ").append(getFormat()).append(","); if (getPrimaryKey() != null) sb.append("PrimaryKey: ").append(getPrimaryKey()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VsamAttributes == false) return false; VsamAttributes other = (VsamAttributes) obj; if (other.getAlternateKeys() == null ^ this.getAlternateKeys() == null) return false; if (other.getAlternateKeys() != null && other.getAlternateKeys().equals(this.getAlternateKeys()) == false) return false; if (other.getCompressed() == null ^ this.getCompressed() == null) return false; if (other.getCompressed() != null && other.getCompressed().equals(this.getCompressed()) == false) return false; if (other.getEncoding() == null ^ this.getEncoding() == null) return false; if (other.getEncoding() != null && other.getEncoding().equals(this.getEncoding()) == 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.getPrimaryKey() == null ^ this.getPrimaryKey() == null) return false; if (other.getPrimaryKey() != null && other.getPrimaryKey().equals(this.getPrimaryKey()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlternateKeys() == null) ? 0 : getAlternateKeys().hashCode()); hashCode = prime * hashCode + ((getCompressed() == null) ? 0 : getCompressed().hashCode()); hashCode = prime * hashCode + ((getEncoding() == null) ? 0 : getEncoding().hashCode()); hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getPrimaryKey() == null) ? 0 : getPrimaryKey().hashCode()); return hashCode; } @Override public VsamAttributes clone() { try { return (VsamAttributes) 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.mainframemodernization.model.transform.VsamAttributesMarshaller.getInstance().marshall(this, protocolMarshaller); } }