def __init__(self, datacenter, machine_id=None, data=None, <EOL>credentials=False):
self.id = machine_id or data.pop('<STR_LIT:id>')<EOL>self.datacenter = datacenter<EOL>"""<STR_LIT>"""<EOL>if not data:<EOL><INDENT>data = self.datacenter.raw_machine_data(self.id, <EOL>credentials=credentials)<EOL><DEDENT>self._save(data)<EOL>
:param datacenter: datacenter that contains this machine
:type datacenter: :py:class:`smartdc.datacenter.DataCenter`

:param machine_id: unique ID of the machine
:type machine_id: :py:class:`basestring`

:param data: raw data for instantiation
:type data: :py:class:`dict`

:param credentials: whether credentials should be returned
:type credentials: :py:class:`bool`

Typically, a :py:class:`smartdc.machine.Machine` object is 
instantiated automatically by a 
:py:class:`smartdc.datacenter.DataCenter` object, but a user may 
instantiate one with a minimum of a `datacenter` parameter and a 
unique ID according to the machine. The object then pulls in the
machine data from the datacenter API. If `data` is passed in to  
instantiate, then ingest the dict and populate internal values from 
that.

All of the following attributes are read-only:

:var name: human-readable label for the machine
:var id: identifier for the machine
:var type: type (`smartmachine` or `virtualmachine`) of the 
    machine
:var state: last-known state of the machine
:var dataset: the machine template
:var memory: the RAM (MiB) allocated for the machine 
    (:py:class:`int`\)
:var disk: the persistent storage (MiB) allocated for the 
    machine (:py:class:`int`\)
:var ips: :py:class:`list` of IPv4 addresses for the machine
:var metadata: :py:class:`dict` of user-generated attributes for 
    the machine
:var created: :py:class:`datetime.datetime` of machine creation 
    time
:var updated: :py:class:`datetime.datetime` of machine update 
    time