### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.deployment

# Class Consumer

java.lang.Object
com.sas.services.deployment.Consumer

All Implemented Interfaces:
  `Cloneable`

@SASScope("ALL") @BinaryCompatibilityOnly public final class Consumer extends Object implements Cloneable
A Consumer is an application which may consume resources within a foundation service's configuration.

Since:
  9.2

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Consumer(String name)`
  Constructs a consumer using the specified name.
  `Consumer(Element element)`
  Constructs a consumer from an XML "Consumer" Element.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `clone()`
  Clones this object.
  `Element`
  `createElement(Document document)`
  Creates an XML Element representing this Consumer.
  `boolean`
  `equals(Object other)`
  Determines if the other object is equal to his object.
  `String`
  `getID()`
  Gets the consumer's ID.
  `String`
  `getName()`
  Gets the consumer's name.
  `int`
  `hashCode()`
  Gets this object's hash code.
  `void`
  `setName(String name)`
  Sets the consumer's name.
  `String`
  `toString()`
  Gets a string representation of this consumer.

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

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

- ## Constructor Details

  - ### Consumer

    public Consumer(String name)
    Constructs a consumer using the specified name.
    Parameters:
      `name` - Consumer's name.

  - ### Consumer

    public Consumer(Element element)
    Constructs a consumer from an XML "Consumer" Element.
    Parameters:
      `element` - "Consumer" XML Element.

- ## Method Details

  - ### getName

    public String getName()
    Gets the consumer's name.
    Returns:
      Consumer's name.

  - ### setName

    public void setName(String name)
    Sets the consumer's name.
    Parameters:
      `name` - Consumer's name.

  - ### getID

    public String getID()
    Gets the consumer's ID.
    Returns:
      Consumer's ID.

  - ### createElement

    public Element createElement(Document document)
    Creates an XML Element representing this Consumer.
    Parameters:
      `document` - XML document which will be used to create this Element.
    Returns:
      XML Element representing this Consumer.

  - ### clone

    public Object clone() throws CloneNotSupportedException
    Clones this object.
    Overrides:
      `clone` in class `Object`
    Returns:
      Clone of this Consumer.
    Throws:
      `CloneNotSupportedException` - if unable to clone.

  - ### equals

    public boolean equals(Object other)
    Determines if the other object is equal to his object.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if the other object is a `Consumer` and its ID and name match this object.

  - ### hashCode

    public int hashCode()
    Gets this object's hash code.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      Hash code.

  - ### toString

    public String toString()
    Gets a string representation of this consumer.
    Overrides:
      `toString` in class `Object`
    Returns:
      Non-localized string that presents "Consumer[name=xx][id=xx]".