setAttribute 
  Sets a string attribute.
Return
The AttributeEditor.
Parameters
The attribute. Must be greater must be greater than 1 character and not contain #.
The attribute string. It must be greater than 1 character and less than 1024 characters in length.
Throws
if:
- The key is empty or contains - #.
- The string is empty or greater than 1024 characters in length. 
Sets an integer number attribute.
Return
The AttributeEditor.
Parameters
The attribute. Must be greater must be greater than 1 character and not contain #.
The number attribute.
Throws
if:
- The key is empty or contains - #.
Sets a long number attribute.
Return
The AttributeEditor.
Parameters
The attribute. Must be greater must be greater than 1 character and not contain #.
The number attribute.
Throws
if:
- The key is empty or contains - #.
Sets a float number attribute.
Return
The AttributeEditor.
Parameters
The attribute. Must be greater must be greater than 1 character and not contain #.
The number attribute.
Throws
if:
- The key is empty or contains - #.
if:
- The number is NaN or infinite. 
Sets a double number attribute.
Return
The AttributeEditor.
Parameters
The attribute. Must be greater must be greater than 1 character and not contain #.
The number attribute.
Throws
if:
- The key is empty or contains - #.
if:
- The number is NaN or infinite. 
Sets a date attribute.
Return
The AttributeEditor.
Parameters
The attribute. Must be greater must be greater than 1 character and not contain #.
The date attribute.
Throws
if:
- The key is empty or contains - #.
Sets a custom attribute with a JSON payload and optional expiration.
Return
The AttributeEditor.
Parameters
The attribute.
The instance identifier.
A JsonMap representing the custom payload.
Throws
if:
- The key is empty or contains - #.
- The expiration is invalid (in the past or 731 days from now. 
- The payload is empty or contains a reserved key - exp.