def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
local_buffer = utils.BytearrayStream()<EOL>if self._unique_identifier:<EOL><INDENT>self._unique_identifier.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>for attribute_name in self._attribute_names:<EOL><INDENT>attribute_name.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for attribute_name in self._attribute_names:<EOL><INDENT>t = enums.convert_attribute_name_to_tag(attribute_name.value)<EOL>e = primitives.Enumeration(<EOL>enums.Tags,<EOL>value=t,<EOL>tag=enums.Tags.ATTRIBUTE_REFERENCE<EOL>)<EOL>e.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT><DEDENT>self.length = local_buffer.length()<EOL>super(GetAttributesRequestPayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>
Write the data encoding the GetAttributes request payload to a
stream.

Args:
    output_buffer (stream): A data stream in which to encode object
        data, supporting a write method; usually a BytearrayStream
        object.
    kmip_version (KMIPVersion): An enumeration defining the KMIP
        version with which the object will be encoded. Optional,
        defaults to KMIP 1.0.