def build(self, builder):
        """
        Build XML by appending to builder
        """

        params = {}
        if self.signature_id is not None:
            # If a Signature element is contained within a Signatures element, the ID attribute is required.
            params['ID'] = self.signature_id

        builder.start("Signature", params)

        if self.user_ref is None:
            raise ValueError("User Reference not set.")
        self.user_ref.build(builder)

        if self.location_ref is None:
            raise ValueError("Location Reference not set.")
        self.location_ref.build(builder)

        if self.signature_ref is None:
            raise ValueError("Signature Reference not set.")
        self.signature_ref.build(builder)

        if self.date_time_stamp is None:
            raise ValueError("DateTime not set.")
        self.date_time_stamp.build(builder)

        builder.end("Signature")
def build ( self , builder ) : params = { } if self . signature_id is not None : params [ 'ID' ] = self . signature_id builder . start ( "Signature" , params ) if self . user_ref is None : raise ValueError ( "User Reference not set." ) self . user_ref . build ( builder ) if self . location_ref is None : raise ValueError ( "Location Reference not set." ) self . location_ref . build ( builder ) if self . signature_ref is None : raise ValueError ( "Signature Reference not set." ) self . signature_ref . build ( builder ) if self . date_time_stamp is None : raise ValueError ( "DateTime not set." ) self . date_time_stamp . build ( builder ) builder . end ( "Signature" )
Build XML by appending to builder