super(Digest, self).read(istream, kmip_version=kmip_version)<EOL>tstream = BytearrayStream(istream.read(self.length))<EOL>self.hashing_algorithm.read(tstream, kmip_version=kmip_version)<EOL>self.digest_value.read(tstream, kmip_version=kmip_version)<EOL>self.key_format_type.read(tstream, kmip_version=kmip_version)<EOL>self.is_oversized(tstream)<EOL>self.validate()<EOL>

Read the data encoding the Digest object and decode it into its
constituent parts.

Args:
    istream (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.


def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):

tstream = BytearrayStream()<EOL>self.hashing_algorithm.write(tstream, kmip_version=kmip_version)<EOL>self.digest_value.write(tstream, kmip_version=kmip_version)<EOL>self.key_format_type.write(tstream, kmip_version=kmip_version)<EOL>self.length = tstream.length()<EOL>super(Digest, self).write(ostream, kmip_version=kmip_version)<EOL>ostream.write(tstream.buffer)<EOL>

Write the data encoding the Digest object to a stream.

Args:
    ostream (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.


Error check the attributes of the Digest object.


algorithm = HashingAlgorithm(hashing_algorithm)<EOL>value = DigestValue(bytearray(digest_value))<EOL>format_type = KeyFormatType(key_format_type)<EOL>return Digest(hashing_algorithm=algorithm,<EOL>digest_value=value,<EOL>key_format_type=format_type)<EOL>

Construct a Digest object from provided digest values.

Args:
    hashing_algorithm (HashingAlgorithm): An enumeration representing
        the hash algorithm used to compute the digest. Optional,
        defaults to HashingAlgorithm.SHA_256.
    digest_value (byte string): The bytes of the digest hash. Optional,
        defaults to the empty byte string.
    key_format_type (KeyFormatType): An enumeration representing the
        format of the key corresponding to the digest. Optional,
        defaults to KeyFormatType.RAW.

Returns:
    Digest: The newly created Digest.

Example:
    >>> x = Digest.create(HashingAlgorithm.MD5, b'\x00',
    ... KeyFormatType.RAW)
    >>> x.hashing_algorithm
    HashingAlgorithm(value=HashingAlgorithm.MD5)
    >>> x.digest_value
    DigestValue(value=bytearray(b'\x00'))
    >>> x.key_format_type
    KeyFormatType(value=KeyFormatType.RAW)


super(ApplicationNamespace, self).__init__(<EOL>value, Tags.APPLICATION_NAMESPACE)<EOL>

Construct an ApplicationNamespace object.

Args:
    value (str): A string representing a namespace. Optional, defaults
        to None.


super(ApplicationData, self).__init__(value, Tags.APPLICATION_DATA)<EOL>

Construct an ApplicationData object.

Args:
    value (str): A string representing data for a particular namespace.
        Optional, defaults to None.


def __init__(self, application_namespace=None, application_data=None):

super(ApplicationSpecificInformation, self).__init__(<EOL>Tags.APPLICATION_SPECIFIC_INFORMATION)<EOL>if application_namespace is None:<EOL><INDENT>self.application_namespace = ApplicationNamespace()<EOL><DEDENT>else:<EOL><INDENT>self.application_namespace = application_namespace<EOL><DEDENT>if application_data is None:<EOL><INDENT>self.application_data = ApplicationData()<EOL><DEDENT>else:<EOL><INDENT>self.application_data = application_data<EOL><DEDENT>self.validate()<EOL>

Construct an ApplicationSpecificInformation object.

Args:
    application_namespace (ApplicationNamespace): The name of a
        namespace supported by the server. Optional, defaults to None.
    application_data (ApplicationData): String data relevant to the
        specified namespace. Optional, defaults to None.


def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0):

Read the data encoding the ApplicationSpecificInformation object and
decode it into its constituent parts.

Args:
    istream (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.


tstream = BytearrayStream()<EOL>self.application_namespace.write(tstream, kmip_version=kmip_version)<EOL>self.application_data.write(tstream, kmip_version=kmip_version)<EOL>self.length = tstream.length()<EOL>super(ApplicationSpecificInformation, self).write(<EOL>ostream,<EOL>kmip_version=kmip_version<EOL>)<EOL>ostream.write(tstream.buffer)<EOL>

Write the data encoding the ApplicationSpecificInformation object to a
stream.

Args:
    ostream (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.


Error check the types of the different attributes of the
ApplicationSpecificInformation object.


@classmethod<EOL><INDENT>def create(cls, application_namespace, application_data):<DEDENT>

namespace = ApplicationNamespace(application_namespace)<EOL>data = ApplicationData(application_data)<EOL>return ApplicationSpecificInformation(<EOL>application_namespace=namespace, application_data=data)<EOL>

Construct an ApplicationSpecificInformation object from provided data
and namespace values.

Args:
    application_namespace (str): The name of the application namespace.
    application_data (str): Application data related to the namespace.

Returns:
    ApplicationSpecificInformation: The newly created set of
        application information.

Example:
    >>> x = ApplicationSpecificInformation.create('namespace', 'data')
    >>> x.application_namespace.value
    'namespace'
    >>> x.application_data.value
    'data'


super(DerivationParameters, self).__init__(<EOL>tag=Tags.DERIVATION_PARAMETERS<EOL>)<EOL>self._cryptographic_parameters = None<EOL>self._initialization_vector = None<EOL>self._derivation_data = None<EOL>self._salt = None<EOL>self._iteration_count = None<EOL>self.cryptographic_parameters = cryptographic_parameters<EOL>self.initialization_vector = initialization_vector<EOL>self.derivation_data = derivation_data<EOL>self.salt = salt<EOL>self.iteration_count = iteration_count<EOL>

Construct a DerivationParameters struct.

Args:
    cryptographic_parameters (CryptographicParameters): A
        CryptographicParameters struct containing the settings for
        the derivation process. Optional, defaults to None. If not
        included, the CryptographicParameters associated with the
        managed object will be used instead.
    initialization_vector (bytes): The IV value to be used with the
        pseudo-random derivation function (PRF). Optional depending
        on the PRF, defaults to None.
    derivation_data (bytes): A data component to be used instead of
        or with a derivation key to derive the new cryptographic
        object. Optional, defaults to None.
    salt (bytes): A salt value required by the PBKDF2 algorithm.
        Optional, defaults to None.
    iteration_count (bytes): An iteration count value required by
        the PBKDF2 algorithm. Optional, defaults to None.


def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):

super(DerivationParameters, self).read(<EOL>input_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_stream = BytearrayStream(input_stream.read(self.length))<EOL>if self.is_tag_next(<EOL>enums.Tags.CRYPTOGRAPHIC_PARAMETERS,<EOL>local_stream<EOL>):<EOL><INDENT>self._cryptographic_parameters = CryptographicParameters()<EOL>self._cryptographic_parameters.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.INITIALIZATION_VECTOR, local_stream):<EOL><INDENT>self._initialization_vector = ByteString(<EOL>tag=enums.Tags.INITIALIZATION_VECTOR<EOL>)<EOL>self._initialization_vector.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.DERIVATION_DATA, local_stream):<EOL><INDENT>self._derivation_data = ByteString(tag=enums.Tags.DERIVATION_DATA)<EOL>self._derivation_data.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>if self.is_tag_next(enums.Tags.SALT, local_stream):<EOL><INDENT>self._salt = ByteString(tag=enums.Tags.SALT)<EOL>self._salt.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>if self.is_tag_next(Tags.ITERATION_COUNT, local_stream):<EOL><INDENT>self._iteration_count = Integer(tag=Tags.ITERATION_COUNT)<EOL>self._iteration_count.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>self.is_oversized(local_stream)<EOL>

Read the data encoding the DerivationParameters struct and decode it
into its constituent parts.

Args:
    input_stream (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.


def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):

Write the data encoding the DerivationParameters struct to a stream.

Args:
    output_stream (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.


def get_valid_value(self, direct_value, config_section,<EOL>config_option_name, default_value):

ARG_MSG = "<STR_LIT>"<EOL>CONF_MSG = "<STR_LIT>"<EOL>DEFAULT_MSG = "<STR_LIT>"<EOL>if direct_value:<EOL><INDENT>return_value = direct_value<EOL>self.logger.debug(ARG_MSG.format(direct_value, config_option_name))<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>return_value = self.conf.get(config_section,<EOL>config_option_name)<EOL>self.logger.debug(CONF_MSG.format(return_value,<EOL>CONFIG_FILE,<EOL>config_option_name))<EOL><DEDENT>except Exception:<EOL><INDENT>return_value = default_value<EOL>self.logger.debug(DEFAULT_MSG.format(default_value,<EOL>config_option_name))<EOL><DEDENT><DEDENT>if return_value == self.NONE_VALUE:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return return_value<EOL><DEDENT>

Returns a value that can be used as a parameter in client or
        server. If a direct_value is given, that value will be returned
        instead of the value from the config file. If the appropriate config
        file option is not found, the default_value is returned.

        :param direct_value: represents a direct value that should be used.
                             supercedes values from config files
        :param config_section: which section of the config file to use
        :param config_option_name: name of config option value
        :param default_value: default value to be used if other options not
                              found
        :returns: a value that can be used as a parameter


def __init__(self, unique_identifier=None, usage_limits_count=None):

super(GetUsageAllocationRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._usage_limits_count = None<EOL>self.unique_identifier = unique_identifier<EOL>self.usage_limits_count = usage_limits_count<EOL>

Construct a GetUsageAllocation request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) to obtain a usage allocation for. Optional,
        defaults to None.
    usage_limits_count (int): The number of usage limits units that
        should be reserved for the object. Optional, defaults to None.


Read the data encoding the GetUsageAllocation request payload and
decode it into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the GetUsageAllocation request payload to a
stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(GetUsageAllocationResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct a GetUsageAllocation response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) that was allocated. Optional, defaults to None.


Read the data encoding the GetUsageAllocation response payload and
decode it into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the GetUsageAllocation response payload to a
stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(CreateRequestPayload, self).__init__(<EOL>tag=enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._object_type = None<EOL>self._template_attribute = None<EOL>self.object_type = object_type<EOL>self.template_attribute = template_attribute<EOL>

Construct a Create request payload structure.

Args:
    object_type (enum): An ObjectType enumeration specifying the type
        of object to create. Optional, defaults to None. Required for
        read/write.
    template_attribute (TemplateAttribute): A TemplateAttribute
        structure containing a set of attributes to set on the new
        object. Optional, defaults to None. Required for read/write.


def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):

super(CreateRequestPayload, 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.OBJECT_TYPE, local_buffer):<EOL><INDENT>self._object_type = primitives.Enumeration(<EOL>enums.ObjectType,<EOL>tag=enums.Tags.OBJECT_TYPE<EOL>)<EOL>self._object_type.read(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self.is_tag_next(enums.Tags.TEMPLATE_ATTRIBUTE, local_buffer):<EOL><INDENT>self._template_attribute = objects.TemplateAttribute()<EOL>self._template_attribute.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if self.is_tag_next(enums.Tags.ATTRIBUTES, local_buffer):<EOL><INDENT>attributes = objects.Attributes()<EOL>attributes.read(local_buffer, kmip_version=kmip_version)<EOL>value = objects.convert_attributes_to_template_attribute(<EOL>attributes<EOL>)<EOL>self._template_attribute = value<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the Create request payload and decode it into
its constituent parts.

Args:
    input_buffer (stream): A data buffer containing encoded object
        data, supporting a read method.
    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 the object type or template
        attribute is missing from the encoded payload.


def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):

local_buffer = utils.BytearrayStream()<EOL>if self._object_type:<EOL><INDENT>self._object_type.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self._template_attribute:<EOL><INDENT>self._template_attribute.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if self._template_attribute:<EOL><INDENT>attributes = objects.convert_template_attribute_to_attributes(<EOL>self._template_attribute<EOL>)<EOL>attributes.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>self.length = local_buffer.length()<EOL>super(CreateRequestPayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>

Write the data encoding the Create request payload to a buffer.

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

Raises:
    InvalidField: Raised if the object type attribute or template
        attribute is not defined.


super(CreateResponsePayload, self).__init__(<EOL>tag=enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._object_type = None<EOL>self._unique_identifier = None<EOL>self._template_attribute = None<EOL>self.object_type = object_type<EOL>self.unique_identifier = unique_identifier<EOL>self.template_attribute = template_attribute<EOL>

Construct a Create response payload structure.

Args:
    object_type (enum): An ObjectType enumeration specifying the type
        of object created. Optional, defaults to None. Required for
        read/write.
    unique_identifier (string): The ID of the new object. Optional,
        defaults to None. Required for read/write.
    template_attribute (TemplateAttribute): A TemplateAttribute
        structure containing a set of attributes that were set on the
        new object. Optional, defaults to None.


super(CreateResponsePayload, 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.OBJECT_TYPE, local_buffer):<EOL><INDENT>self._object_type = primitives.Enumeration(<EOL>enums.ObjectType,<EOL>tag=enums.Tags.OBJECT_TYPE<EOL>)<EOL>self._object_type.read(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>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>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self.is_tag_next(enums.Tags.TEMPLATE_ATTRIBUTE, local_buffer):<EOL><INDENT>self._template_attribute = objects.TemplateAttribute()<EOL>self._template_attribute.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the Create response payload and decode it into
its constituent parts.

Args:
    input_buffer (stream): A data buffer containing encoded object
        data, supporting a read method.
    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 the object type or unique
        identifier is missing from the encoded payload.


Write the data encoding the Create response payload to a buffer.

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

Raises:
    InvalidField: Raised if the object type attribute or unique
        identifier is not defined.


super(PollRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._asynchronous_correlation_value = None<EOL>self.asynchronous_correlation_value = asynchronous_correlation_value<EOL>

Construct a Poll request payload struct.

Args:
    asynchronous_correlation_value (bytes): The ID of a pending
        operation to poll the status of, in bytes. Optional, defaults
        to None.


Read the data encoding the Poll request payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Poll request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(CancelRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._asynchronous_correlation_value = None<EOL>self.asynchronous_correlation_value = asynchronous_correlation_value<EOL>

Construct a Cancel request payload struct.

Args:
    asynchronous_correlation_value (bytes): The ID of a pending
        operation to cancel, in bytes. Optional, defaults to None.


Read the data encoding the Cancel request payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Cancel request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(CancelResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._asynchronous_correlation_value = None<EOL>self._cancellation_result = None<EOL>self.asynchronous_correlation_value = asynchronous_correlation_value<EOL>self.cancellation_result = cancellation_result<EOL>

Construct a Cancel response payload struct.

Args:
    asynchronous_correlation_value (bytes): The ID of a pending
        operation that was cancelled, in bytes. Optional, defaults to
        None.
    cancellation_result (enum): A CancellationResult enumeration
        specifying the result of canceling the operation. Optional,
        defaults to None.


Read the data encoding the Cancel response payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Cancel response payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(ObtainLeaseRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct an ObtainLease request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) to obtain a lease for. Optional, defaults to
        None.


Read the data encoding the ObtainLease request payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the ObtainLease request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(ObtainLeaseResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._lease_time = None<EOL>self._last_change_date = None<EOL>self.unique_identifier = unique_identifier<EOL>self.lease_time = lease_time<EOL>self.last_change_date = last_change_date<EOL>

Construct an ObtainLease response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) a lease was obtained for. Optional, defaults to
        None.
    lease_time (int): The amount of time, in seconds, that the object
        lease is in effect for. Optional, defaults to None.
    last_change_date (int): The date, in seconds since the epoch,
        when the last change was made to the object or one of its
        attributes. Optional, defaults to None.


Read the data encoding the ObtainLease response payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the ObtainLease response payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(GetAttributeListRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct a GetAttributeList request payload.

Args:
    unique_identifier (string): The ID of the managed object with
        which the retrieved attribute names should be associated.
        Optional, defaults to None.


Read the data encoding the GetAttributeList 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.


Write the data encoding the GetAttributeList 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.


def __init__(self, unique_identifier=None, attribute_names=None):

super(GetAttributeListResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._attribute_names = list()<EOL>self.unique_identifier = unique_identifier<EOL>self.attribute_names = attribute_names<EOL>

Construct a GetAttributeList response payload.

Args:
    unique_identifier (string): The ID of the managed object with
        which the retrieved attribute names should be associated.
        Optional, defaults to None.
    attribute_names: A list of strings identifying the names of the
        attributes associated with the managed object. Optional,
        defaults to None.


super(GetAttributeListResponsePayload, 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>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<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>if len(names) == <NUM_LIT:0>:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<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 GetAttributeList response 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 the unique identifier or attribute
        names are missing from the encoded payload.


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>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self._attribute_names:<EOL><INDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>for attribute_name in self._attribute_names:<EOL><INDENT>attribute_name.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for attribute_name in self._attribute_names:<EOL><INDENT>t = enums.convert_attribute_name_to_tag(<EOL>attribute_name.value<EOL>)<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><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.length = local_buffer.length()<EOL>super(GetAttributeListResponsePayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>

Write the data encoding the GetAttributeList response 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.

Raises:
    InvalidField: Raised if the unique identifier or attribute name
        are not defined.


super(DecryptRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._cryptographic_parameters = None<EOL>self._data = None<EOL>self._iv_counter_nonce = None<EOL>self.unique_identifier = unique_identifier<EOL>self.cryptographic_parameters = cryptographic_parameters<EOL>self.data = data<EOL>self.iv_counter_nonce = iv_counter_nonce<EOL>

Construct a Decrypt request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a symmetric key) to be used for decryption. Optional, defaults
        to None. If not included, the ID placeholder will be used.
    cryptographic_parameters (CryptographicParameters): A
        CryptographicParameters struct containing the settings for
        the decryption algorithm. Optional, defaults to None. If not
        included, the CryptographicParameters associated with the
        managed object will be used instead.
    data (bytes): The data to decrypt in binary form. Required for
        encoding and decoding.
    iv_counter_nonce (bytes): The IV/counter/nonce value to be used
        with the decryption algorithm. Optional, defaults to None.


Read the data encoding the Decrypt request payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Decrypt request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(DecryptResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._data = None<EOL>self.unique_identifier = unique_identifier<EOL>self.data = data<EOL>

Construct a Decrypt response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a symmetric key) used for decryption. Required for encoding
        and decoding.
    data (bytes): The decrypted data in binary form. Required for
        encoding and decoding.


super(DecryptResponsePayload, self).read(<EOL>input_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_stream = utils.BytearrayStream(input_stream.read(self.length))<EOL>if self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_stream):<EOL><INDENT>self._unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>self._unique_identifier.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.DATA, local_stream):<EOL><INDENT>self._data = primitives.ByteString(tag=enums.Tags.DATA)<EOL>self._data.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.is_oversized(local_stream)<EOL>

Read the data encoding the Decrypt response payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the unique_identifier or data attributes
        are missing from the encoded payload.


local_stream = utils.BytearrayStream()<EOL>if self._unique_identifier:<EOL><INDENT>self._unique_identifier.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self._data:<EOL><INDENT>self._data.write(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.length = local_stream.length()<EOL>super(DecryptResponsePayload, self).write(<EOL>output_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_stream.write(local_stream.buffer)<EOL>

Write the data encoding the Decrypt response payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the unique_identifier or data attributes
        are not defined.


super(DeriveKeyRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._object_type = None<EOL>self._unique_identifiers = None<EOL>self._derivation_method = None<EOL>self._derivation_parameters = None<EOL>self._template_attribute = None<EOL>self.object_type = object_type<EOL>self.unique_identifiers = unique_identifiers<EOL>self.derivation_method = derivation_method<EOL>self.derivation_parameters = derivation_parameters<EOL>self.template_attribute = template_attribute<EOL>

Construct a DeriveKey request payload struct.

Args:
    object_type (enum): An ObjectType enumeration specifying the type
        of the object to derive. Optional, defaults to None. Required
        for read/write.
    unique_identifiers (list): A list of strings representing the IDs
        of managed objects (e.g., symmetric keys) to be used for
        derivation. Optional, defaults to None. At least one value is
        required for read/write.
    derivation_method (enum): A DerivationMethod enumeration
        specifying the type of derivation function to use (e.g.,
        PBKDF2). Optional, defaults to None. Required for read/write.
    derivation_parameters (DerivationParameters): A structure
        containing cryptographic settings relevant for the derivation
        method. Optional, defaults to None. Required for read/write.
    template_attribute (TemplateAttribute): A structure containing a
        set of attributes (e.g., cryptographic algorithm,
        cryptographic length) that should be set on the newly derived
        cryptographic object. Optional, defaults to None. Required
        for read/write.


super(DeriveKeyRequestPayload, 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.OBJECT_TYPE, local_buffer):<EOL><INDENT>self._object_type = primitives.Enumeration(<EOL>enums.ObjectType,<EOL>tag=enums.Tags.OBJECT_TYPE<EOL>)<EOL>self._object_type.read(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>unique_identifiers = []<EOL>while self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_buffer):<EOL><INDENT>unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>unique_identifier.read(local_buffer, kmip_version=kmip_version)<EOL>unique_identifiers.append(unique_identifier)<EOL><DEDENT>if not unique_identifiers:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self._unique_identifiers = unique_identifiers<EOL><DEDENT>if self.is_tag_next(enums.Tags.DERIVATION_METHOD, local_buffer):<EOL><INDENT>self._derivation_method = primitives.Enumeration(<EOL>enums.DerivationMethod,<EOL>tag=enums.Tags.DERIVATION_METHOD<EOL>)<EOL>self._derivation_method.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.DERIVATION_PARAMETERS, local_buffer):<EOL><INDENT>self._derivation_parameters = attributes.DerivationParameters()<EOL>self._derivation_parameters.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self.is_tag_next(enums.Tags.TEMPLATE_ATTRIBUTE, local_buffer):<EOL><INDENT>self._template_attribute = objects.TemplateAttribute()<EOL>self._template_attribute.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if self.is_tag_next(enums.Tags.ATTRIBUTES, local_buffer):<EOL><INDENT>attrs = objects.Attributes()<EOL>attrs.read(local_buffer, kmip_version=kmip_version)<EOL>value = objects.convert_attributes_to_template_attribute(<EOL>attrs<EOL>)<EOL>self._template_attribute = value<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the DeriveKey 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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the DeriveKey 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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(DeriveKeyResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._template_attribute = None<EOL>self.unique_identifier = unique_identifier<EOL>self.template_attribute = template_attribute<EOL>

Construct a DeriveKey response payload struct.

Args:
    unique_identifier (string): A string representing the ID of the
        newly derived managed object. Optional, defaults to None. At
        least one value is required for encoding and decoding.
    template_attribute (TemplateAttribute): A structure containing a
        set of attributes (e.g., cryptographic algorithm,
        cryptographic length) implicitly set by the server on the
        newly derived cryptographic object. Optional, defaults to
        None.


super(DeriveKeyResponsePayload, 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>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self.is_tag_next(enums.Tags.TEMPLATE_ATTRIBUTE, local_buffer):<EOL><INDENT>self._template_attribute = objects.TemplateAttribute()<EOL>self._template_attribute.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the DeriveKey response 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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the DeriveKey response 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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(GetRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._key_format_type = None<EOL>self._key_compression_type = None<EOL>self._key_wrapping_specification = None<EOL>self.unique_identifier = unique_identifier<EOL>self.key_format_type = key_format_type<EOL>self.key_compression_type = key_compression_type<EOL>self.key_wrapping_specification = key_wrapping_specification<EOL>

Construct a Get request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g., a
        symmetric key) to retrieve. Optional, defaults to None.
    key_format_type (KeyFormatType): A KeyFormatType enumeration that
        specifies the format in which the object should be returned.
        Optional, defaults to None.
    key_compression_type (KeyCompressionType): A KeyCompressionType
        enumeration that specifies the compression method to be used
        when returning elliptic curve public keys. Optional, defaults
        to None.
    key_wrapping_specification (KeyWrappingSpecification): A
        KeyWrappingSpecification struct that specifies keys and other
        information for wrapping the returned object. Optional,
        defaults to None.


Read the data encoding the Get request payload and decode it into its
constituent parts.

Args:
    input_stream (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.


local_stream = utils.BytearrayStream()<EOL>if self._unique_identifier is not None:<EOL><INDENT>self._unique_identifier.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._key_format_type is not None:<EOL><INDENT>self._key_format_type.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._key_compression_type is not None:<EOL><INDENT>self._key_compression_type.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._key_wrapping_specification is not None:<EOL><INDENT>self._key_wrapping_specification.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>self.length = local_stream.length()<EOL>super(GetRequestPayload, self).write(<EOL>output_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_stream.write(local_stream.buffer)<EOL>

Write the data encoding the Get request payload to a stream.

Args:
    output_stream (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.


super(GetResponsePayload, self).__init__(<EOL>tag=enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._object_type = None<EOL>self._unique_identifier = None<EOL>self._secret = None<EOL>self.object_type = object_type<EOL>self.unique_identifier = unique_identifier<EOL>self.secret = secret<EOL>self.secret_factory = secret_factory.SecretFactory()<EOL>

Construct a Get response payload struct.

Args:
    object_type (ObjectType): An ObjectType enumeration specifying the
        type of managed object being returned. Optional, defaults to
        None. Required for read/write.
    unique_identifier (string): The ID of the managed object (e.g., a
        symmetric key) being returned. Optional, defaults to None.
        Required for read/write.
    secret (various): The managed object struct being returned. Must
        be one of the following:

        Optional, defaults to None. Required for read/write.


super(GetResponsePayload, self).read(<EOL>input_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_stream = utils.BytearrayStream(input_stream.read(self.length))<EOL>if self.is_tag_next(enums.Tags.OBJECT_TYPE, local_stream):<EOL><INDENT>self._object_type = primitives.Enumeration(<EOL>enum=enums.ObjectType,<EOL>tag=enums.Tags.OBJECT_TYPE<EOL>)<EOL>self._object_type.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_stream):<EOL><INDENT>self._unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>self._unique_identifier.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.secret = self.secret_factory.create(self.object_type)<EOL>if self.is_tag_next(self._secret.tag, local_stream):<EOL><INDENT>self._secret.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.is_oversized(local_stream)<EOL>

Read the data encoding the Get response payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the object type, unique identifier, or
        secret attributes are missing from the encoded payload.


local_stream = utils.BytearrayStream()<EOL>if self.object_type:<EOL><INDENT>self._object_type.write(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if self.unique_identifier:<EOL><INDENT>self._unique_identifier.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self.secret:<EOL><INDENT>self._secret.write(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.length = local_stream.length()<EOL>super(GetResponsePayload, self).write(<EOL>output_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_stream.write(local_stream.buffer)<EOL>

Write the data encoding the Get response payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the object type, unique identifier, or
        secret attributes are missing from the payload struct.


super(EncryptRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._cryptographic_parameters = None<EOL>self._data = None<EOL>self._iv_counter_nonce = None<EOL>self.unique_identifier = unique_identifier<EOL>self.cryptographic_parameters = cryptographic_parameters<EOL>self.data = data<EOL>self.iv_counter_nonce = iv_counter_nonce<EOL>

Construct an Encrypt request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a symmetric key) to be used for encryption. Optional, defaults
        to None. If not included, the ID placeholder will be used.
    cryptographic_parameters (CryptographicParameters): A
        CryptographicParameters struct containing the settings for
        the encryption algorithm. Optional, defaults to None. If not
        included, the CryptographicParameters associated with the
        managed object will be used instead.
    data (bytes): The data to encrypt in binary form. Required for
        encoding and decoding.
    iv_counter_nonce (bytes): The IV/counter/nonce value to be used
        with the encryption algorithm. Optional, defaults to None.


Read the data encoding the Encrypt request payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Encrypt request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(EncryptResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._data = None<EOL>self._iv_counter_nonce = None<EOL>self.unique_identifier = unique_identifier<EOL>self.data = data<EOL>self.iv_counter_nonce = iv_counter_nonce<EOL>

Construct an Encrypt response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a symmetric key) used for encryption. Required for encoding
        and decoding.
    data (bytes): The encrypted data in binary form. Required for
        encoding and decoding.
    iv_counter_nonce (bytes): The IV/counter/nonce value used with
        the encryption algorithm if it was required and if this
        value was not originally specified by the client. Optional,
        defaults to None.


Read the data encoding the Encrypt response payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the unique_identifier or data attributes
        are missing from the encoded payload.


Write the data encoding the Encrypt response payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the unique_identifier or data attributes
        are not defined.


super(LocateRequestPayload, self).__init__(enums.Tags.REQUEST_PAYLOAD)<EOL>self._maximum_items = None<EOL>self._offset_items = None<EOL>self._storage_status_mask = None<EOL>self._object_group_member = None<EOL>self._attributes = None<EOL>self.maximum_items = maximum_items<EOL>self.offset_items = offset_items<EOL>self.storage_status_mask = storage_status_mask<EOL>self.object_group_member = object_group_member<EOL>self.attributes = attributes<EOL>

Construct a Locate request payload structure.

Args:
    maximum_items (int): An integer specifying the maximum number of
        object identifiers to be returned. Optional, defaults to None.
    offset_items (int): An integer specifying the number of object
        identifiers to skip when selecting the object identifiers to
        return. Optional, defaults to None.
    storage_status_mask (int, list): An integer bit mask or a
        corresponding list of StorageStatusMask enumerations indicating
        which types of stored objects should be searched. Optional,
        defaults to None.
    object_group_member (enum): An ObjectGroupMember enumeration
        specifying the object group member type for the searched
        objects. Optional, defaults to None.
    attributes (list): A list of Attribute structures containing the
        attribute values that should be used to filter and match
        objects. Optional, defaults to None. Required for read/write
        for KMIP 2.0+.


super(LocateRequestPayload, 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.MAXIMUM_ITEMS, local_buffer):<EOL><INDENT>self._maximum_items = primitives.Integer(<EOL>tag=enums.Tags.MAXIMUM_ITEMS<EOL>)<EOL>self._maximum_items.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.OFFSET_ITEMS, local_buffer):<EOL><INDENT>self._offset_items = primitives.Integer(<EOL>tag=enums.Tags.OFFSET_ITEMS<EOL>)<EOL>self._offset_items.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.STORAGE_STATUS_MASK, local_buffer):<EOL><INDENT>self._storage_status_mask = primitives.Integer(<EOL>tag=enums.Tags.STORAGE_STATUS_MASK<EOL>)<EOL>self._storage_status_mask.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.OBJECT_GROUP_MEMBER, local_buffer):<EOL><INDENT>self._object_group_member = primitives.Enumeration(<EOL>enums.ObjectGroupMember,<EOL>tag=enums.Tags.OBJECT_GROUP_MEMBER<EOL>)<EOL>self._object_group_member.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>while self.is_tag_next(enums.Tags.ATTRIBUTE, local_buffer):<EOL><INDENT>attribute = objects.Attribute()<EOL>attribute.read(local_buffer, kmip_version=kmip_version)<EOL>self._attributes.append(attribute)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if self.is_tag_next(enums.Tags.ATTRIBUTES, local_buffer):<EOL><INDENT>attributes = objects.Attributes()<EOL>attributes.read(local_buffer, kmip_version=kmip_version)<EOL>temp_attr = objects.convert_attributes_to_template_attribute(<EOL>attributes<EOL>)<EOL>self._attributes = temp_attr.attributes<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>

Read the data encoding the Locate request payload and decode it into
its constituent parts.

Args:
    input_buffer (stream): A data buffer containing encoded object
        data, supporting a read method.
    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 the attributes structure is missing
        from the encoded payload for KMIP 2.0+ encodings.


local_buffer = utils.BytearrayStream()<EOL>if self._maximum_items:<EOL><INDENT>self._maximum_items.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>if self._offset_items:<EOL><INDENT>self._offset_items.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>if self._storage_status_mask:<EOL><INDENT>self._storage_status_mask.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._object_group_member:<EOL><INDENT>self._object_group_member.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if kmip_version < enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self._attributes:<EOL><INDENT>for attribute in self.attributes:<EOL><INDENT>attribute.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if self._attributes:<EOL><INDENT>template_attribute = objects.TemplateAttribute(<EOL>attributes=self.attributes<EOL>)<EOL>attributes = objects.convert_template_attribute_to_attributes(<EOL>template_attribute<EOL>)<EOL>attributes.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>self.length = local_buffer.length()<EOL>super(LocateRequestPayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>

Write the data encoding the Locate request payload to a buffer.

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


super(LocateResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD)<EOL>self._located_items = None<EOL>self._unique_identifiers = None<EOL>self.located_items = located_items<EOL>self.unique_identifiers = unique_identifiers<EOL>

Construct a Locate response payload structure.

Args:
    located_items (int): An integer specifying the number of matching
        objects found by the server. Note that this may not equal the
        number of object identifiers returned in this payload.
        Optional, defaults to None.
    unique_identifiers (list): A list of strings specifying the object
        identifiers for matching objects. Optional, defaults to None.


super(LocateResponsePayload, 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.LOCATED_ITEMS, local_buffer):<EOL><INDENT>self._located_items = primitives.Integer(<EOL>tag=enums.Tags.LOCATED_ITEMS<EOL>)<EOL>self._located_items.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>self._unique_identifiers = []<EOL>while self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_buffer):<EOL><INDENT>unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>unique_identifier.read(local_buffer, kmip_version=kmip_version)<EOL>self._unique_identifiers.append(unique_identifier)<EOL><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the Locate response payload and decode it
into its constituent parts.

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


local_buffer = utils.BytearrayStream()<EOL>if self._located_items:<EOL><INDENT>self._located_items.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT>if self._unique_identifiers:<EOL><INDENT>for unique_identifier in self._unique_identifiers:<EOL><INDENT>unique_identifier.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>self.length = local_buffer.length()<EOL>super(LocateResponsePayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>

Write the data encoding the Locate response payload to a buffer.

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


super(SignRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._cryptographic_parameters = None<EOL>self._data = None<EOL>self.unique_identifier = unique_identifier<EOL>self.cryptographic_parameters = cryptographic_parameters<EOL>self.data = data<EOL>

Construct a Sign request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g. a
        public key) to be used for encryption. Optional, defaults to
        None. If not included, the ID placeholder will be used.
    cryptographic_parameters (CryptographicParameters): A
        CryptographicParameters struct containing the settings for
        the signature algorithm. Optional, defaults to None. If not
        included, the CryptographicParameters associated with the
        managed object will be used instead.
    data (bytes): The data to be signed, in binary form.


Read the data encoding the Sign request payload and decode it
into its parts

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

Raises:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Sign request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(SignResponsePayload, self).read(<EOL>input_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_stream = utils.BytearrayStream(input_stream.read(self.length))<EOL>if self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_stream):<EOL><INDENT>self._unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>self._unique_identifier.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.SIGNATURE_DATA, local_stream):<EOL><INDENT>self._signature_data = primitives.ByteString(<EOL>tag=enums.Tags.SIGNATURE_DATA<EOL>)<EOL>self._signature_data.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>

Read the data encoding the Sign response payload and decode it.

Args:
    input_stream (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:
    ValueError: Raised if the unique_identifier or signature attributes
        are missing from the encoded payload.


Write the data encoding the Sign response to a stream.

Args:
    output_stream (stream): A data stream in which to encode object
        data, supporting a write method; usually a BytearrayStream
        object.

Raises:
    ValueError: Raised if the unique_identifier or signature
        attributes are not defined.


super(ArchiveRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct an Archive request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) to archive. Optional, defaults to None.


Read the data encoding the Archive request payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Archive request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(ArchiveResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct an Archive response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) that was archived. Optional, defaults to None.


Read the data encoding the Archive response payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Archive response payload to a stream.

Args:
    output_stream (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 decoded. Optional,
        defaults to KMIP 1.0.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(RecoverRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct a Recover request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) to recover. Optional, defaults to None.


Read the data encoding the Recover request payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Recover request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(RecoverResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self.unique_identifier = unique_identifier<EOL>

Construct a Recover response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) that was recovered. Optional, defaults to None.


Read the data encoding the Recover response payload and decode it
into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Recover response payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(QueryRequestPayload, self).__init__(enums.Tags.REQUEST_PAYLOAD)<EOL>self._query_functions = None<EOL>self.query_functions = query_functions<EOL>

Construct a QueryRequestPayload object.

Args:
    query_functions (list): A list of QueryFunction enumerations.


super(QueryRequestPayload, self).read(<EOL>input_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_buffer = utils.BytearrayStream(input_buffer.read(self.length))<EOL>query_functions = []<EOL>while(self.is_tag_next(enums.Tags.QUERY_FUNCTION, local_buffer)):<EOL><INDENT>query_function = primitives.Enumeration(<EOL>enums.QueryFunction,<EOL>tag=enums.Tags.QUERY_FUNCTION<EOL>)<EOL>query_function.read(local_buffer, kmip_version=kmip_version)<EOL>query_functions.append(query_function)<EOL><DEDENT>if query_functions:<EOL><INDENT>self._query_functions = query_functions<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidKmipEncoding(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the QueryRequestPayload object 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 the query functions are missing
        from the encoded payload.


local_buffer = utils.BytearrayStream()<EOL>if self._query_functions:<EOL><INDENT>for query_function in self._query_functions:<EOL><INDENT>query_function.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidField(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.length = local_buffer.length()<EOL>super(QueryRequestPayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>

Write the data encoding the QueryRequestPayload object 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.

Raises:
    InvalidField: Raised if the query functions are not defined.


super(QueryResponsePayload, self).read(<EOL>input_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_buffer = utils.BytearrayStream(input_buffer.read(self.length))<EOL>operations = []<EOL>while(self.is_tag_next(enums.Tags.OPERATION, local_buffer)):<EOL><INDENT>operation = primitives.Enumeration(<EOL>enums.Operation,<EOL>tag=enums.Tags.OPERATION<EOL>)<EOL>operation.read(local_buffer, kmip_version=kmip_version)<EOL>operations.append(operation)<EOL><DEDENT>self._operations = operations<EOL>object_types = []<EOL>while(self.is_tag_next(enums.Tags.OBJECT_TYPE, local_buffer)):<EOL><INDENT>object_type = primitives.Enumeration(<EOL>enums.ObjectType,<EOL>tag=enums.Tags.OBJECT_TYPE<EOL>)<EOL>object_type.read(local_buffer, kmip_version=kmip_version)<EOL>object_types.append(object_type)<EOL><DEDENT>self._object_types = object_types<EOL>if self.is_tag_next(enums.Tags.VENDOR_IDENTIFICATION, local_buffer):<EOL><INDENT>vendor_identification = primitives.TextString(<EOL>tag=enums.Tags.VENDOR_IDENTIFICATION<EOL>)<EOL>vendor_identification.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>self._vendor_identification = vendor_identification<EOL><DEDENT>if self.is_tag_next(enums.Tags.SERVER_INFORMATION, local_buffer):<EOL><INDENT>server_information = misc.ServerInformation()<EOL>server_information.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>self._server_information = server_information<EOL><DEDENT>application_namespaces = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.APPLICATION_NAMESPACE,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>application_namespace = primitives.TextString(<EOL>tag=enums.Tags.APPLICATION_NAMESPACE<EOL>)<EOL>application_namespace.read(local_buffer, kmip_version=kmip_version)<EOL>application_namespaces.append(application_namespace)<EOL><DEDENT>self._application_namespaces = application_namespaces<EOL>if kmip_version >= enums.KMIPVersion.KMIP_1_1:<EOL><INDENT>extensions_information = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.EXTENSION_INFORMATION,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>extension_information = objects.ExtensionInformation()<EOL>extension_information.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>extensions_information.append(extension_information)<EOL><DEDENT>self._extension_information = extensions_information<EOL><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_1_2:<EOL><INDENT>attestation_types = []<EOL>while(self.is_tag_next(enums.Tags.ATTESTATION_TYPE, local_buffer)):<EOL><INDENT>attestation_type = primitives.Enumeration(<EOL>enums.AttestationType,<EOL>tag=enums.Tags.ATTESTATION_TYPE<EOL>)<EOL>attestation_type.read(local_buffer, kmip_version=kmip_version)<EOL>attestation_types.append(attestation_type)<EOL><DEDENT>self._attestation_types = attestation_types<EOL><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_1_3:<EOL><INDENT>rngs_parameters = []<EOL>while(self.is_tag_next(enums.Tags.RNG_PARAMETERS, local_buffer)):<EOL><INDENT>rng_parameters = objects.RNGParameters()<EOL>rng_parameters.read(local_buffer, kmip_version=kmip_version)<EOL>rngs_parameters.append(rng_parameters)<EOL><DEDENT>self._rng_parameters = rngs_parameters<EOL>profiles_information = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.PROFILE_INFORMATION,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>profile_information = objects.ProfileInformation()<EOL>profile_information.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>profiles_information.append(profile_information)<EOL><DEDENT>self._profile_information = profiles_information<EOL>validations_information = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.VALIDATION_INFORMATION,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>validation_information = objects.ValidationInformation()<EOL>validation_information.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>validations_information.append(validation_information)<EOL><DEDENT>self._validation_information = validations_information<EOL>capabilities_information = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.CAPABILITY_INFORMATION,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>capability_information = objects.CapabilityInformation()<EOL>capability_information.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>capabilities_information.append(capability_information)<EOL><DEDENT>self._capability_information = capabilities_information<EOL>client_registration_methods = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.CLIENT_REGISTRATION_METHOD,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>client_registration_method = primitives.Enumeration(<EOL>enums.ClientRegistrationMethod,<EOL>tag=enums.Tags.CLIENT_REGISTRATION_METHOD<EOL>)<EOL>client_registration_method.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>client_registration_methods.append(client_registration_method)<EOL><DEDENT>self._client_registration_methods = client_registration_methods<EOL><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self.is_tag_next(enums.Tags.DEFAULTS_INFORMATION, local_buffer):<EOL><INDENT>defaults_information = objects.DefaultsInformation()<EOL>defaults_information.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>self._defaults_information = defaults_information<EOL><DEDENT>storage_protection_masks = []<EOL>while(self.is_tag_next(<EOL>enums.Tags.PROTECTION_STORAGE_MASK,<EOL>local_buffer<EOL>)<EOL>):<EOL><INDENT>storage_protection_mask = primitives.Integer(<EOL>tag=enums.Tags.PROTECTION_STORAGE_MASK<EOL>)<EOL>storage_protection_mask.read(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>storage_protection_masks.append(storage_protection_mask)<EOL><DEDENT>self._storage_protection_masks = storage_protection_masks<EOL><DEDENT>self.is_oversized(local_buffer)<EOL>

Read the data encoding the QueryResponsePayload object 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.


local_buffer = utils.BytearrayStream()<EOL>if self._operations:<EOL><INDENT>for operation in self._operations:<EOL><INDENT>operation.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT><DEDENT>if self._object_types:<EOL><INDENT>for object_type in self._object_types:<EOL><INDENT>object_type.write(local_buffer, kmip_version=kmip_version)<EOL><DEDENT><DEDENT>if self._vendor_identification:<EOL><INDENT>self._vendor_identification.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._server_information:<EOL><INDENT>self._server_information.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._application_namespaces:<EOL><INDENT>for application_namespace in self._application_namespaces:<EOL><INDENT>application_namespace.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_1_1:<EOL><INDENT>if self._extension_information:<EOL><INDENT>for extension_information in self._extension_information:<EOL><INDENT>extension_information.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_1_2:<EOL><INDENT>if self._attestation_types:<EOL><INDENT>for attestation_type in self._attestation_types:<EOL><INDENT>attestation_type.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_1_3:<EOL><INDENT>if self._rng_parameters:<EOL><INDENT>for rng_parameters in self._rng_parameters:<EOL><INDENT>rng_parameters.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>if self._profile_information:<EOL><INDENT>for profile_information in self._profile_information:<EOL><INDENT>profile_information.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>if self._validation_information:<EOL><INDENT>for validation_information in self._validation_information:<EOL><INDENT>validation_information.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>if self._capability_information:<EOL><INDENT>for capability_information in self._capability_information:<EOL><INDENT>capability_information.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT>if self._client_registration_methods:<EOL><INDENT>for client_reg_method in self._client_registration_methods:<EOL><INDENT>client_reg_method.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT><DEDENT>if kmip_version >= enums.KMIPVersion.KMIP_2_0:<EOL><INDENT>if self._defaults_information:<EOL><INDENT>self._defaults_information.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self._storage_protection_masks:<EOL><INDENT>for storage_protection_mask in self._storage_protection_masks:<EOL><INDENT>storage_protection_mask.write(<EOL>local_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT><DEDENT><DEDENT>self.length = local_buffer.length()<EOL>super(QueryResponsePayload, self).write(<EOL>output_buffer,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_buffer.write(local_buffer.buffer)<EOL>

Write the data encoding the QueryResponsePayload object 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.


super(SignatureVerifyRequestPayload, self).__init__(<EOL>enums.Tags.REQUEST_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._cryptographic_parameters = None<EOL>self._data = None<EOL>self._digested_data = None<EOL>self._signature_data = None<EOL>self._correlation_value = None<EOL>self._init_indicator = None<EOL>self._final_indicator = None<EOL>self.unique_identifier = unique_identifier<EOL>self.cryptographic_parameters = cryptographic_parameters<EOL>self.data = data<EOL>self.digested_data = digested_data<EOL>self.signature_data = signature_data<EOL>self.correlation_value = correlation_value<EOL>self.init_indicator = init_indicator<EOL>self.final_indicator = final_indicator<EOL>

Construct a SignatureVerify request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) to be used for signature verification. Optional,
        defaults to None.
    cryptographic_parameters (CryptographicParameters): A
        CryptographicParameters struct containing the settings for
        the signature verification operation. Optional, defaults to
        None.
    data (bytes): The bytes representing the original data that was
        signed. Optional, defaults to None.
    digested_data (bytes): The bytes representing the digested data to
        be verified with the signature. Optional, defaults to None.
    signature_data (bytes): The bytes representing the signature to be
        verified. Optional, defaults to None.
    correlation_value (bytes): The bytes representing a correlation
        value, allowing the linking together of individual payloads
        for a single overarching operation. Optional, defaults to None.
    init_indicator (boolean): A boolean value indicating whether or not
        the payload is the first in a series for a multi-payload
        operation. Optional, defaults to None.
    final_indicator (boolean): A boolean value indicating whether or
        not the payload is the last in a series for a multi-payload
        operation. Optional, defaults to None.


super(SignatureVerifyRequestPayload, self).read(<EOL>input_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>local_stream = utils.BytearrayStream(input_stream.read(self.length))<EOL>if self.is_tag_next(enums.Tags.UNIQUE_IDENTIFIER, local_stream):<EOL><INDENT>self._unique_identifier = primitives.TextString(<EOL>tag=enums.Tags.UNIQUE_IDENTIFIER<EOL>)<EOL>self._unique_identifier.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.CRYPTOGRAPHIC_PARAMETERS, local_stream):<EOL><INDENT>self._cryptographic_parameters =attributes.CryptographicParameters()<EOL>self._cryptographic_parameters.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.DATA, local_stream):<EOL><INDENT>self._data = primitives.ByteString(tag=enums.Tags.DATA)<EOL>self._data.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>if self.is_tag_next(enums.Tags.DIGESTED_DATA, local_stream):<EOL><INDENT>self._digested_data = primitives.ByteString(<EOL>tag=enums.Tags.DIGESTED_DATA<EOL>)<EOL>self._digested_data.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>if self.is_tag_next(enums.Tags.SIGNATURE_DATA, local_stream):<EOL><INDENT>self._signature_data = primitives.ByteString(<EOL>tag=enums.Tags.SIGNATURE_DATA<EOL>)<EOL>self._signature_data.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>if self.is_tag_next(enums.Tags.CORRELATION_VALUE, local_stream):<EOL><INDENT>self._correlation_value = primitives.ByteString(<EOL>tag=enums.Tags.CORRELATION_VALUE<EOL>)<EOL>self._correlation_value.read(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>if self.is_tag_next(enums.Tags.INIT_INDICATOR, local_stream):<EOL><INDENT>self._init_indicator = primitives.Boolean(<EOL>tag=enums.Tags.INIT_INDICATOR<EOL>)<EOL>self._init_indicator.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>if self.is_tag_next(enums.Tags.FINAL_INDICATOR, local_stream):<EOL><INDENT>self._final_indicator = primitives.Boolean(<EOL>tag=enums.Tags.FINAL_INDICATOR<EOL>)<EOL>self._final_indicator.read(local_stream, kmip_version=kmip_version)<EOL><DEDENT>self.is_oversized(local_stream)<EOL>

Read the data encoding the SignatureVerify request payload and decode
it into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the SignatureVerify request payload to a
stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(SignatureVerifyResponsePayload, self).__init__(<EOL>enums.Tags.RESPONSE_PAYLOAD<EOL>)<EOL>self._unique_identifier = None<EOL>self._validity_indicator = None<EOL>self._data = None<EOL>self._correlation_value = None<EOL>self.unique_identifier = unique_identifier<EOL>self.validity_indicator = validity_indicator<EOL>self.data = data<EOL>self.correlation_value = correlation_value<EOL>

Construct a SignatureVerify response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) used for signature verification. Optional,
        defaults to None. Required for read/write.
    validity_indicator (ValidityIndicator): A ValidityIndicator
        enumeration that specifies the validity of the signature.
        Optional, defaults to None. Required for read/write.
    data (bytes): The bytes representing any data recovered during the
        signature verification process. Optional, defaults to None.
    correlation_value (bytes): The bytes representing a correlation
        value, allowing the linking together of individual payloads
        for a single overarching operation. Optional, defaults to None.


Read the data encoding the SignatureVerify response payload and decode
it into its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the SignatureVerify response payload to a
stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(CheckRequestPayload, self).__init__(enums.Tags.REQUEST_PAYLOAD)<EOL>self._unique_identifier = None<EOL>self._usage_limits_count = None<EOL>self._cryptographic_usage_mask = None<EOL>self._lease_time = None<EOL>self.unique_identifier = unique_identifier<EOL>self.usage_limits_count = usage_limits_count<EOL>self.cryptographic_usage_mask = cryptographic_usage_mask<EOL>self.lease_time = lease_time<EOL>

Construct a Check request payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) to be checked. Optional, defaults to None.
    usage_limits_count (int): The number of usage limits units that
        should be available on the checked object. Optional, defaults
        to None.
    cryptographic_usage_mask (int): The numeric representation of a
        set of usage masks that should be set on the checked object.
        Optional, defaults to None.
    lease_time (int): The date in seconds since the epoch that a
        lease should be available for on the checked object. Optional,
        defaults to None.


Read the data encoding the Check request payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.


Write the data encoding the Check request payload to a stream.

Args:
    output_stream (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.

Raises:
    ValueError: Raised if the data attribute is not defined.


super(CheckResponsePayload, self).__init__(enums.Tags.RESPONSE_PAYLOAD)<EOL>self._unique_identifier = None<EOL>self._usage_limits_count = None<EOL>self._cryptographic_usage_mask = None<EOL>self._lease_time = None<EOL>self.unique_identifier = unique_identifier<EOL>self.usage_limits_count = usage_limits_count<EOL>self.cryptographic_usage_mask = cryptographic_usage_mask<EOL>self.lease_time = lease_time<EOL>

Construct a Check response payload struct.

Args:
    unique_identifier (string): The ID of the managed object (e.g.,
        a public key) that was checked. Optional, defaults to None.
    usage_limits_count (int): The number of usage limits units that
        should be available on the checked object. Optional, defaults
        to None.
    cryptographic_usage_mask (int): The numeric representation of a
        set of usage masks that should be set on the checked object.
        Optional, defaults to None.
    lease_time (int): The date in seconds since the epoch that a
        lease should be available for on the checked object. Optional,
        defaults to None.


Read the data encoding the Check response payload and decode it into
its constituent parts.

Args:
    input_stream (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:
    ValueError: Raised if the data attribute is missing from the
        encoded payload.