com.verisign.epp.codec.validate.v02

## Class EPPValidateKeyValue

- java.lang.Object
- - com.verisign.epp.codec.validate.v02.EPPValidateKeyValue

- All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

      public class EPPValidateKeyValue
      extends java.lang.Object
      implements EPPCodecComponent

  `EPPValidateKeyValue` is used to hold key, value pairs along with an optional "contactType" attribute for use in `EPPValidateCheckCmd` and `EPPValidateKeyValue`. `EPPValidateKeyValue` consists of a required "key" and "value" attribute.
  See Also:
    `EPPValidateCheckCmd`, `EPPValidateKeyValue`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELM_LOCALNAME` Constant for the key value local name
    `static java.lang.String` | `ELM_NAME` Constant for the key value tag

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPValidateKeyValue()` Default constructor for `EPPValidateKeyValue`.
    `EPPValidateKeyValue(java.lang.String aKey, java.lang.String aValue)` Constructor for `EPPValidateKeyValue` that includes the required attributes of the key and the value.
    `EPPValidateKeyValue(java.lang.String aKey, java.lang.String aValue, java.lang.String aContactType)` Constructor for `EPPValidateKeyValue` that includes all of the attributes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPValidateKeyValue`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPValidateKeyValue` attributes from the aElement DOM Element tree.
    `org.w3c.dom.Element` | `encode(org.w3c.dom.Document aDocument)` Encode a DOM Element tree from the attributes of the `EPPValidateKeyValue` instance.
    `boolean` | `equals(java.lang.Object aObject)` Compare an instance of `EPPValidateKeyValue` with this instance.
    `java.lang.String` | `getContactType()` Gets the contact type.
    `java.lang.String` | `getKey()` Gets the key.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.lang.String` | `getValue()` Gets the value.
    `boolean` | `hasContactType()` Is the contact type defined?
    `void` | `setContactType(java.lang.String aType)` Sets the contact type.
    `void` | `setKey(java.lang.String aKey)` Sets the key.
    `void` | `setValue(java.lang.String aValue)` Sets the value.
    `java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      Constant for the key value local name
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      Constant for the key value tag
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPValidateKeyValue

          public EPPValidateKeyValue()

      Default constructor for `EPPValidateKeyValue`.

    - #### EPPValidateKeyValue

          public EPPValidateKeyValue(java.lang.String aKey,
                                     java.lang.String aValue)

      Constructor for `EPPValidateKeyValue` that includes the required attributes of the key and the value.
      Parameters:
        `aKey` - Key associated with the value
        `aValue` - Value associated with the key

    - #### EPPValidateKeyValue

          public EPPValidateKeyValue(java.lang.String aKey,
                                     java.lang.String aValue,
                                     java.lang.String aContactType)

      Constructor for `EPPValidateKeyValue` that includes all of the attributes.
      Parameters:
        `aKey` - Key associated with the value
        `aValue` - Value associated with the key
        `aContactType` - Contact type associated with this key value pair.

  - ### Method Detail

    - #### getKey

          public java.lang.String getKey()

      Gets the key.
      Returns:
        The key if defined;`null` otherwise.

    - #### setKey

          public void setKey(java.lang.String aKey)

      Sets the key.
      Parameters:
        `aKey` - The key

    - #### getValue

          public java.lang.String getValue()

      Gets the value.
      Returns:
        The value if defined;`null` otherwise.

    - #### setValue

          public void setValue(java.lang.String aValue)

      Sets the value.
      Parameters:
        `aValue` - The value

    - #### hasContactType

          public boolean hasContactType()

      Is the contact type defined?
      Returns:
        `true` if the contact type is defined; `false` otherwise.

    - #### getContactType

          public java.lang.String getContactType()

      Gets the contact type.
      Returns:
        The contact type if defined;`null` otherwise.

    - #### setContactType

          public void setContactType(java.lang.String aType)

      Sets the contact type.
      Parameters:
        `aType` - The contact type

    - #### encode

          public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                                     throws EPPEncodeException

      Encode a DOM Element tree from the attributes of the `EPPValidateKeyValue` instance.
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Parameters:
        `aDocument` - DOM Document that is being built. Used as an Element factory.
      Returns:
        Element Root DOM Element representing the `EPPValidateKeyValue` instance.
      Throws:
        `EPPEncodeException` - Unable to encode `EPPValidateKeyValue` instance.

    - #### decode

          public void decode(org.w3c.dom.Element aElement)
                      throws EPPDecodeException

      Decode the `EPPValidateKeyValue` attributes from the aElement DOM Element tree.
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root DOM Element to decode `EPPValidateKeyValue` from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement.

    - #### equals

          public boolean equals(java.lang.Object aObject)

      Compare an instance of `EPPValidateKeyValue` with this instance.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - Object to compare with.
      Returns:
        `true` if equal; `false` otherwise.

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone `EPPValidateKeyValue`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPValidateKeyValue`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### toString

          public java.lang.String toString()

      Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Returns:
        XML namespace for the `EPPCodecComponent`.