Class MacAttributes

java.lang.Object
software.amazon.awssdk.services.paymentcryptographydata.model.MacAttributes
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<MacAttributes.Builder,MacAttributes>

@Generated("software.amazon.awssdk:codegen") public final class MacAttributes extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MacAttributes.Builder,MacAttributes>

Parameters that are required for DUKPT, HMAC, or EMV MAC generation or verification.

See Also:
  • Method Details

    • algorithm

      public final MacAlgorithm algorithm()

      The encryption algorithm for MAC generation or verification.

      If the service returns an enum value that is not available in the current SDK version, algorithm will return MacAlgorithm.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from algorithmAsString().

      Returns:
      The encryption algorithm for MAC generation or verification.
      See Also:
    • algorithmAsString

      public final String algorithmAsString()

      The encryption algorithm for MAC generation or verification.

      If the service returns an enum value that is not available in the current SDK version, algorithm will return MacAlgorithm.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from algorithmAsString().

      Returns:
      The encryption algorithm for MAC generation or verification.
      See Also:
    • emvMac

      public final MacAlgorithmEmv emvMac()

      Parameters that are required for MAC generation or verification using EMV MAC algorithm.

      Returns:
      Parameters that are required for MAC generation or verification using EMV MAC algorithm.
    • dukptIso9797Algorithm1

      public final MacAlgorithmDukpt dukptIso9797Algorithm1()

      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.

      Returns:
      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.
    • dukptIso9797Algorithm3

      public final MacAlgorithmDukpt dukptIso9797Algorithm3()

      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.

      Returns:
      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.
    • dukptCmac

      public final MacAlgorithmDukpt dukptCmac()

      Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.

      Returns:
      Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.
    • toBuilder

      public MacAttributes.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<MacAttributes.Builder,MacAttributes>
      Returns:
      a builder for type T
    • builder

      public static MacAttributes.Builder builder()
    • serializableBuilderClass

      public static Class<? extends MacAttributes.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • fromAlgorithm

      public static MacAttributes fromAlgorithm(String algorithm)
      Create an instance of this class with algorithmAsString() initialized to the given value.

      The encryption algorithm for MAC generation or verification.

      Parameters:
      algorithm - The encryption algorithm for MAC generation or verification.
      See Also:
    • fromAlgorithm

      public static MacAttributes fromAlgorithm(MacAlgorithm algorithm)
      Create an instance of this class with algorithmAsString() initialized to the given value.

      The encryption algorithm for MAC generation or verification.

      Parameters:
      algorithm - The encryption algorithm for MAC generation or verification.
      See Also:
    • fromEmvMac

      public static MacAttributes fromEmvMac(MacAlgorithmEmv emvMac)
      Create an instance of this class with emvMac() initialized to the given value.

      Parameters that are required for MAC generation or verification using EMV MAC algorithm.

      Parameters:
      emvMac - Parameters that are required for MAC generation or verification using EMV MAC algorithm.
    • fromEmvMac

      public static MacAttributes fromEmvMac(Consumer<MacAlgorithmEmv.Builder> emvMac)
      Create an instance of this class with emvMac() initialized to the given value.

      Parameters that are required for MAC generation or verification using EMV MAC algorithm.

      Parameters:
      emvMac - Parameters that are required for MAC generation or verification using EMV MAC algorithm.
    • fromDukptIso9797Algorithm1

      public static MacAttributes fromDukptIso9797Algorithm1(MacAlgorithmDukpt dukptIso9797Algorithm1)
      Create an instance of this class with dukptIso9797Algorithm1() initialized to the given value.

      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.

      Parameters:
      dukptIso9797Algorithm1 - Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.
    • fromDukptIso9797Algorithm1

      public static MacAttributes fromDukptIso9797Algorithm1(Consumer<MacAlgorithmDukpt.Builder> dukptIso9797Algorithm1)
      Create an instance of this class with dukptIso9797Algorithm1() initialized to the given value.

      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.

      Parameters:
      dukptIso9797Algorithm1 - Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1.
    • fromDukptIso9797Algorithm3

      public static MacAttributes fromDukptIso9797Algorithm3(MacAlgorithmDukpt dukptIso9797Algorithm3)
      Create an instance of this class with dukptIso9797Algorithm3() initialized to the given value.

      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.

      Parameters:
      dukptIso9797Algorithm3 - Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.
    • fromDukptIso9797Algorithm3

      public static MacAttributes fromDukptIso9797Algorithm3(Consumer<MacAlgorithmDukpt.Builder> dukptIso9797Algorithm3)
      Create an instance of this class with dukptIso9797Algorithm3() initialized to the given value.

      Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.

      Parameters:
      dukptIso9797Algorithm3 - Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3.
    • fromDukptCmac

      public static MacAttributes fromDukptCmac(MacAlgorithmDukpt dukptCmac)
      Create an instance of this class with dukptCmac() initialized to the given value.

      Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.

      Parameters:
      dukptCmac - Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.
    • fromDukptCmac

      public static MacAttributes fromDukptCmac(Consumer<MacAlgorithmDukpt.Builder> dukptCmac)
      Create an instance of this class with dukptCmac() initialized to the given value.

      Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.

      Parameters:
      dukptCmac - Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm.
    • type

      public MacAttributes.Type type()
      Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will be MacAttributes.Type.UNKNOWN_TO_SDK_VERSION if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will be MacAttributes.Type.UNKNOWN_TO_SDK_VERSION if zero members are set, and null if more than one member is set.
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.