def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
super(GetAttributesRequestPayload, self).read(<EOL>input_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_buffer = utils.BytearrayStream(input_buffer.read(self.length))<EOL>if self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_buffer):<EOL><INDENT>self._unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>self._unique_identifier.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self._unique_identifier = None<EOL><DEDENT>names = list()<EOL>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>while self.is_tag_next(enums.Tags.ATTRIBUTE_NAME, local_buffer):<EOL><INDENT>name = primitives.TextString(tag=enums.Tags.ATTRIBUTE_NAME)<EOL>name.read(local_buffer, kmip_version=kmip_version)<EOL>names.append(name)<EOL><DEDENT>self._attribute_names = names<EOL><DEDENT>else:<EOL><INDENT>while self.is_tag_next(<EOL>enums.Tags.ATTRIBUTE_REFERENCE,<EOL>local_buffer<EOL>):<EOL><INDENT>if self.is_type_next(enums.Types.STRUCTURE, local_buffer):<EOL><INDENT>reference = objects.AttributeReference()<EOL>reference.read(local_buffer, kmip_version=kmip_version)<EOL>names.append(<EOL>primitives.TextString(<EOL>value=reference.attribute_name,<EOL>tag=enums.Tags.ATTRIBUTE_NAME<EOL>)<EOL>)<EOL><DEDENT>elif self.is_type_next(enums.Types.ENUMERATION, local_buffer):<EOL><INDENT>reference = primitives.Enumeration(<EOL>enums.Tags,<EOL>tag=enums.Tags.ATTRIBUTE_REFERENCE<EOL>)<EOL>reference.read(local_buffer, kmip_version=kmip_version)<EOL>name = enums.convert_attribute_tag_to_name(reference.value)<EOL>names.append(<EOL>primitives.TextString(<EOL>value=name,<EOL>tag=enums.Tags.ATTRIBUTE_NAME<EOL>)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>self._attribute_names = names<EOL><DEDENT>self.is_oversized(local_buffer)<EOL>
Read the data encoding the GetAttributes request payload and decode
it into its constituent parts.

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

Raises:
    InvalidKmipEncoding: Raised if an invalid type is found for the
        AttributeReference encoding for KMIP 2.0+ encodings.