def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_str_value("addedByTenantId", self.added_by_tenant_id)
        writer.write_enum_value("memberState", self.member_state)
        writer.write_enum_value("role", self.role)
        writer.write_object_value("transitionDetails", self.transition_details)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/multi_tenant_organization_join_request_record.py