/* * 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.paymentcryptographydata.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 GeneratePinDataRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block.
*
* The attributes and values to use for PIN, PVV, or PIN Offset generation. *
*/ private PinGenerationAttributes generationAttributes; /** *
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.
*
* The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment
* Cryptography supports ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the fill
* digits are random values from 10 to 15.
*
* The length of PIN under generation. *
*/ private Integer pinDataLength; /** ** The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card * with a specific account holder. *
*/ private String primaryAccountNumber; /** *
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block.
*
keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN
* Block.
*/
public void setEncryptionKeyIdentifier(String encryptionKeyIdentifier) {
this.encryptionKeyIdentifier = encryptionKeyIdentifier;
}
/**
*
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block.
*
keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN
* Block.
*/
public String getEncryptionKeyIdentifier() {
return this.encryptionKeyIdentifier;
}
/**
*
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block.
*
keyARN
of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN
* Block.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GeneratePinDataRequest withEncryptionKeyIdentifier(String encryptionKeyIdentifier) {
setEncryptionKeyIdentifier(encryptionKeyIdentifier);
return this;
}
/**
* * The attributes and values to use for PIN, PVV, or PIN Offset generation. *
* * @param generationAttributes * The attributes and values to use for PIN, PVV, or PIN Offset generation. */ public void setGenerationAttributes(PinGenerationAttributes generationAttributes) { this.generationAttributes = generationAttributes; } /** ** The attributes and values to use for PIN, PVV, or PIN Offset generation. *
* * @return The attributes and values to use for PIN, PVV, or PIN Offset generation. */ public PinGenerationAttributes getGenerationAttributes() { return this.generationAttributes; } /** ** The attributes and values to use for PIN, PVV, or PIN Offset generation. *
* * @param generationAttributes * The attributes and values to use for PIN, PVV, or PIN Offset generation. * @return Returns a reference to this object so that method calls can be chained together. */ public GeneratePinDataRequest withGenerationAttributes(PinGenerationAttributes generationAttributes) { setGenerationAttributes(generationAttributes); return this; } /** *
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.
*
keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data
* generation.
*/
public void setGenerationKeyIdentifier(String generationKeyIdentifier) {
this.generationKeyIdentifier = generationKeyIdentifier;
}
/**
*
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.
*
keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data
* generation.
*/
public String getGenerationKeyIdentifier() {
return this.generationKeyIdentifier;
}
/**
*
* The keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.
*
keyARN
of the PEK that Amazon Web Services Payment Cryptography uses for pin data
* generation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GeneratePinDataRequest withGenerationKeyIdentifier(String generationKeyIdentifier) {
setGenerationKeyIdentifier(generationKeyIdentifier);
return this;
}
/**
*
* The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment
* Cryptography supports ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the fill
* digits are random values from 10 to 15.
*
ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the
* fill digits are random values from 10 to 15.
* @see PinBlockFormatForPinData
*/
public void setPinBlockFormat(String pinBlockFormat) {
this.pinBlockFormat = pinBlockFormat;
}
/**
*
* The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment
* Cryptography supports ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the fill
* digits are random values from 10 to 15.
*
ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN
* block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in
* length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the
* fill digits are random values from 10 to 15.
* @see PinBlockFormatForPinData
*/
public String getPinBlockFormat() {
return this.pinBlockFormat;
}
/**
*
* The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment
* Cryptography supports ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the fill
* digits are random values from 10 to 15.
*
ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the
* fill digits are random values from 10 to 15.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PinBlockFormatForPinData
*/
public GeneratePinDataRequest withPinBlockFormat(String pinBlockFormat) {
setPinBlockFormat(pinBlockFormat);
return this;
}
/**
*
* The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment
* Cryptography supports ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the fill
* digits are random values from 10 to 15.
*
ISO_Format_0
and ISO_Format_3
.
*
* The ISO_Format_0
PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block
* formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.
*
* The ISO_Format_3
PIN block format is the same as ISO_Format_0
except that the
* fill digits are random values from 10 to 15.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PinBlockFormatForPinData
*/
public GeneratePinDataRequest withPinBlockFormat(PinBlockFormatForPinData pinBlockFormat) {
this.pinBlockFormat = pinBlockFormat.toString();
return this;
}
/**
*
* The length of PIN under generation. *
* * @param pinDataLength * The length of PIN under generation. */ public void setPinDataLength(Integer pinDataLength) { this.pinDataLength = pinDataLength; } /** ** The length of PIN under generation. *
* * @return The length of PIN under generation. */ public Integer getPinDataLength() { return this.pinDataLength; } /** ** The length of PIN under generation. *
* * @param pinDataLength * The length of PIN under generation. * @return Returns a reference to this object so that method calls can be chained together. */ public GeneratePinDataRequest withPinDataLength(Integer pinDataLength) { setPinDataLength(pinDataLength); return this; } /** ** The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card * with a specific account holder. *
* * @param primaryAccountNumber * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates * the card with a specific account holder. */ public void setPrimaryAccountNumber(String primaryAccountNumber) { this.primaryAccountNumber = primaryAccountNumber; } /** ** The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card * with a specific account holder. *
* * @return The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates * the card with a specific account holder. */ public String getPrimaryAccountNumber() { return this.primaryAccountNumber; } /** ** The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card * with a specific account holder. *
* * @param primaryAccountNumber * The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates * the card with a specific account holder. * @return Returns a reference to this object so that method calls can be chained together. */ public GeneratePinDataRequest withPrimaryAccountNumber(String primaryAccountNumber) { setPrimaryAccountNumber(primaryAccountNumber); 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 (getEncryptionKeyIdentifier() != null) sb.append("EncryptionKeyIdentifier: ").append(getEncryptionKeyIdentifier()).append(","); if (getGenerationAttributes() != null) sb.append("GenerationAttributes: ").append(getGenerationAttributes()).append(","); if (getGenerationKeyIdentifier() != null) sb.append("GenerationKeyIdentifier: ").append(getGenerationKeyIdentifier()).append(","); if (getPinBlockFormat() != null) sb.append("PinBlockFormat: ").append(getPinBlockFormat()).append(","); if (getPinDataLength() != null) sb.append("PinDataLength: ").append(getPinDataLength()).append(","); if (getPrimaryAccountNumber() != null) sb.append("PrimaryAccountNumber: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GeneratePinDataRequest == false) return false; GeneratePinDataRequest other = (GeneratePinDataRequest) obj; if (other.getEncryptionKeyIdentifier() == null ^ this.getEncryptionKeyIdentifier() == null) return false; if (other.getEncryptionKeyIdentifier() != null && other.getEncryptionKeyIdentifier().equals(this.getEncryptionKeyIdentifier()) == false) return false; if (other.getGenerationAttributes() == null ^ this.getGenerationAttributes() == null) return false; if (other.getGenerationAttributes() != null && other.getGenerationAttributes().equals(this.getGenerationAttributes()) == false) return false; if (other.getGenerationKeyIdentifier() == null ^ this.getGenerationKeyIdentifier() == null) return false; if (other.getGenerationKeyIdentifier() != null && other.getGenerationKeyIdentifier().equals(this.getGenerationKeyIdentifier()) == false) return false; if (other.getPinBlockFormat() == null ^ this.getPinBlockFormat() == null) return false; if (other.getPinBlockFormat() != null && other.getPinBlockFormat().equals(this.getPinBlockFormat()) == false) return false; if (other.getPinDataLength() == null ^ this.getPinDataLength() == null) return false; if (other.getPinDataLength() != null && other.getPinDataLength().equals(this.getPinDataLength()) == false) return false; if (other.getPrimaryAccountNumber() == null ^ this.getPrimaryAccountNumber() == null) return false; if (other.getPrimaryAccountNumber() != null && other.getPrimaryAccountNumber().equals(this.getPrimaryAccountNumber()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEncryptionKeyIdentifier() == null) ? 0 : getEncryptionKeyIdentifier().hashCode()); hashCode = prime * hashCode + ((getGenerationAttributes() == null) ? 0 : getGenerationAttributes().hashCode()); hashCode = prime * hashCode + ((getGenerationKeyIdentifier() == null) ? 0 : getGenerationKeyIdentifier().hashCode()); hashCode = prime * hashCode + ((getPinBlockFormat() == null) ? 0 : getPinBlockFormat().hashCode()); hashCode = prime * hashCode + ((getPinDataLength() == null) ? 0 : getPinDataLength().hashCode()); hashCode = prime * hashCode + ((getPrimaryAccountNumber() == null) ? 0 : getPrimaryAccountNumber().hashCode()); return hashCode; } @Override public GeneratePinDataRequest clone() { return (GeneratePinDataRequest) super.clone(); } }