kmip/core/messages/payloads/revoke.py
def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the RevokeRequestPayload 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.
        """
        tstream = BytearrayStream()

        # Write the contents of the request payload
        if self.unique_identifier is not None:
            self.unique_identifier.write(tstream, kmip_version=kmip_version)

        self.revocation_reason.write(tstream, kmip_version=kmip_version)

        if self.compromise_occurrence_date is not None:
            self.compromise_occurrence_date.write(
                tstream,
                kmip_version=kmip_version
            )

        # Write the length and value of the request payload
        self.length = tstream.length()
        super(RevokeRequestPayload, self).write(
            ostream,
            kmip_version=kmip_version
        )
        ostream.write(tstream.buffer)
def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the RevokeRequestPayload 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.
        """
        tstream = BytearrayStream()

        # Write the contents of the request payload
        if self.unique_identifier is not None:
            self.unique_identifier.write(tstream, kmip_version=kmip_version)

        self.revocation_reason.write(tstream, kmip_version=kmip_version)

        if self.compromise_occurrence_date is not None:
            self.compromise_occurrence_date.write(
                tstream,
                kmip_version=kmip_version
            )

        # Write the length and value of the request payload
        self.length = tstream.length()
        super(RevokeRequestPayload, self).write(
            ostream,
            kmip_version=kmip_version
        )
        ostream.write(tstream.buffer)
def write ( self , ostream , kmip_version = enums . KMIPVersion . KMIP_1_0 ) : tstream = BytearrayStream ( ) # Write the contents of the request payload if self . unique_identifier is not None : self . unique_identifier . write ( tstream , kmip_version = kmip_version ) self . revocation_reason . write ( tstream , kmip_version = kmip_version ) if self . compromise_occurrence_date is not None : self . compromise_occurrence_date . write ( tstream , kmip_version = kmip_version ) # Write the length and value of the request payload self . length = tstream . length ( ) super ( RevokeRequestPayload , self ) . write ( ostream , kmip_version = kmip_version ) ostream . write ( tstream . buffer )
Write the data encoding the RevokeRequestPayload 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.
Write the data encoding the RevokeRequestPayload 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 .